diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 3f060cea..ba39fee6 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -97,6 +97,7 @@ abstract class FluffyThemes { fillColor: lighten(AppConfig.primaryColor, .51), ), appBarTheme: AppBarTheme( + elevation: 2, brightness: Brightness.light, color: Colors.white, textTheme: TextTheme( @@ -178,6 +179,7 @@ abstract class FluffyThemes { ), snackBarTheme: SnackBarThemeData(behavior: SnackBarBehavior.floating), appBarTheme: AppBarTheme( + elevation: 2, brightness: Brightness.dark, color: Color(0xff1D1D1D), textTheme: TextTheme( diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index 007dfab8..32d947d0 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -32,7 +32,6 @@ class ChatList extends StatefulWidget { } class ChatListController extends State { - final ScrollController scrollController = ScrollController(); StreamSubscription _intentDataStreamSubscription; StreamSubscription _intentFileStreamSubscription; @@ -43,15 +42,6 @@ class ChatListController extends State { String get activeChat => VRouter.of(context).pathParameters['roomid']; - bool scrolledTop = true; - - void updateScrolledTop() { - final newScrolledTop = scrollController.offset == 0; - if (scrolledTop != newScrolledTop) { - setState(() => scrolledTop = newScrolledTop); - } - } - void _processIncomingSharedFiles(List files) { if (files?.isEmpty ?? true) return; VRouter.of(context).push('/rooms'); @@ -119,7 +109,6 @@ class ChatListController extends State { @override void initState() { _initReceiveSharingIntent(); - scrollController.addListener(updateScrolledTop); super.initState(); } @@ -128,7 +117,6 @@ class ChatListController extends State { _intentDataStreamSubscription?.cancel(); _intentFileStreamSubscription?.cancel(); _intentUriStreamSubscription?.cancel(); - scrollController.removeListener(updateScrolledTop); super.dispose(); } diff --git a/lib/pages/views/chat_list_view.dart b/lib/pages/views/chat_list_view.dart index 7e28f888..96674335 100644 --- a/lib/pages/views/chat_list_view.dart +++ b/lib/pages/views/chat_list_view.dart @@ -34,7 +34,6 @@ class ChatListView extends StatelessWidget { }, child: Scaffold( appBar: AppBar( - elevation: controller.scrolledTop ? 0 : null, leading: selectMode == SelectMode.normal ? null : IconButton( @@ -230,15 +229,7 @@ class ChatListView extends StatelessWidget { ), ]), floatingActionButton: selectMode == SelectMode.normal - ? controller.scrolledTop - ? FloatingActionButton.extended( - heroTag: 'main_fab', - onPressed: () => - VRouter.of(context).push('/newprivatechat'), - icon: Icon(CupertinoIcons.chat_bubble), - label: Text(L10n.of(context).newChat), - ) - : FloatingActionButton( + ? FloatingActionButton( heroTag: 'main_fab', onPressed: () => VRouter.of(context).push('/newprivatechat'),