fix: Bring back proper emote settings

This commit is contained in:
Sorunome 2021-02-01 16:25:28 +01:00
parent a525d4fd45
commit 4b00d4d648
3 changed files with 11 additions and 4 deletions

View file

@ -161,7 +161,10 @@ class FluffyRoutes {
case 'emotes':
return ViewData(
leftView: (_) => Settings(),
mainView: (_) => EmotesSettings(room: settings.arguments),
mainView: (_) => EmotesSettings(
room: (settings.arguments as Map)['room'],
stateKey: (settings.arguments as Map)['stateKey'],
),
);
case 'ignore':
return ViewData(

View file

@ -322,8 +322,9 @@ class _ChatDetailsState extends State<ChatDetails> {
await AdaptivePageLayout.of(context)
.pushNamed('/rooms/${room.id}/emotes');
} else {
await AdaptivePageLayout.of(context)
.pushNamed('/settings/emotes');
await AdaptivePageLayout.of(context).pushNamed(
'/settings/emotes',
arguments: {'room': room});
}
},
),

View file

@ -45,7 +45,10 @@ class MultipleEmotesSettings extends StatelessWidget {
onTap: () async {
await AdaptivePageLayout.of(context).pushNamed(
'/settings/emotes',
arguments: room,
arguments: {
'room': room,
'stateKey': keys[i],
},
);
},
);