Merge branch 'krille/removeavatar' into 'main'
fix: Remove avatar from room See merge request famedly/fluffychat!578
This commit is contained in:
commit
1f6504980b
2 changed files with 2 additions and 3 deletions
|
|
@ -286,11 +286,10 @@ class ChatDetailsController extends State<ChatDetails> {
|
|||
actions: actions,
|
||||
);
|
||||
if (action == null) return;
|
||||
final matrix = Matrix.of(context);
|
||||
if (action == AvatarAction.remove) {
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => matrix.client.setAvatarUrl(matrix.client.userID, null),
|
||||
future: () => room.setAvatar(null),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class SettingsController extends State<Settings> {
|
|||
if (action == AvatarAction.remove) {
|
||||
final success = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => matrix.client.setAvatarUrl(matrix.client.userID, null),
|
||||
future: () => matrix.client.setAvatar(null),
|
||||
);
|
||||
if (success.error == null) {
|
||||
updateProfile();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue