fix: Emote settings and discovery fallback

This commit is contained in:
Sorunome 2021-02-02 11:24:37 +01:00
parent b079e2bcf5
commit 8f8b8d8bf7
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -132,7 +132,7 @@ class _DiscoverPageState extends State<DiscoverPage> {
}).then((PublicRoomsResponse res) {
if (widget.alias != null &&
!res.chunk.any((room) =>
room.aliases.contains(widget.alias) ||
(room.aliases?.contains(widget.alias) ?? false) ||
room.canonicalAlias == widget.alias)) {
// we have to tack on the original alias
res.chunk.add(PublicRoom.fromJson(<String, dynamic>{