diff --git a/lib/config/go_routes/go_router.dart b/lib/config/go_routes/go_router.dart index ddb3d59d6e..53c495790d 100644 --- a/lib/config/go_routes/go_router.dart +++ b/lib/config/go_routes/go_router.dart @@ -219,11 +219,9 @@ abstract class AppRoutes { GoRoute( path: 'forward', redirect: (context, state) { - if (state.extra is! ForwardArgument) { - return '${state.fullPath?.replaceAll('forward', '')}'; - } else { - return '/rooms/forward'; - } + if (state.extra is ForwardArgument) return '/rooms/forward'; + + return '${state.fullPath?.replaceAll('forward', '')}'; }, pageBuilder: (context, state) { final extra = state.extra as ForwardArgument; diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index b14ca7540d..71937fa8a7 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -1293,8 +1293,3 @@ class ChatController extends State } enum EmojiPickerType { reaction, keyboard } - -class FowardAgr { - final String id; - FowardAgr(this.id); -}