diff --git a/lib/main.dart b/lib/main.dart index 42dbabdb..df8872e9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,11 +18,11 @@ import 'package:shared_preferences/shared_preferences.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); - // Create and initialize the authenticatino store + // Create and initialize the authentication store final authStore = AuthStore(); await authStore.init(); - // Get the shared pereferences instance and obtain the existing user settings if it exists. + // Get the shared preferences instance and obtain the existing user settings if it exists. // If default settings don't exist, use an empty JSON string to use the default values. final preferences = await SharedPreferences.getInstance(); final userSettings = preferences.getString('settings') ?? '{}'; @@ -30,7 +30,7 @@ Future main() async { // Initialize a settings store from the settings JSON string. final settingsStore = SettingsStore.fromJson(jsonDecode(userSettings)); - // Create a MobX reaction that will save the settings on disk everytime they are changed. + // Create a MobX reaction that will save the settings on disk every time they are changed. autorun((_) => preferences.setString('settings', jsonEncode(settingsStore))); await SentryFlutter.init( @@ -77,6 +77,7 @@ class MyApp extends StatelessWidget { accentColor: Colors.deepPurpleAccent, ), dialogBackgroundColor: Colors.grey.shade900, + toggleableActiveColor: Colors.deepPurpleAccent, ); final oledTheme = ThemeData( @@ -98,6 +99,7 @@ class MyApp extends StatelessWidget { accentColor: Colors.deepPurpleAccent, ), dialogBackgroundColor: Colors.black, + toggleableActiveColor: Colors.deepPurpleAccent, ); return Observer( diff --git a/lib/screens/channel/chat/details/chat_users_list.dart b/lib/screens/channel/chat/details/chat_users_list.dart index e0a82d68..23c89ba3 100644 --- a/lib/screens/channel/chat/details/chat_users_list.dart +++ b/lib/screens/channel/chat/details/chat_users_list.dart @@ -1,5 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:frosty/screens/channel/stores/chat_details_store.dart'; import 'package:frosty/widgets/loading_indicator.dart'; @@ -84,7 +85,10 @@ class _ChattersListState extends State { ), Expanded( child: RefreshIndicator( - onRefresh: () => chatDetailStore.updateChatters(widget.userLogin), + onRefresh: () async { + HapticFeedback.lightImpact(); + await chatDetailStore.updateChatters(widget.userLogin); + }, child: Stack( alignment: AlignmentDirectional.bottomCenter, children: [ diff --git a/lib/screens/channel/stores/chat_store.dart b/lib/screens/channel/stores/chat_store.dart index 95d98870..37d4ba3e 100644 --- a/lib/screens/channel/stores/chat_store.dart +++ b/lib/screens/channel/stores/chat_store.dart @@ -48,7 +48,7 @@ abstract class _ChatStoreBase with Store { /// The assets store responsible for badges, emotes, and the emote menu. final assetsStore = ChatAssetsStore(); - /// Requested message to be sent by the user. Will only be sent on receival of a USERNOTICE command. + /// Requested message to be sent by the user. Will only be sent on receipt of a USERNOTICE command. IRCMessage? toSend; /// The list of chat messages to render and display. diff --git a/lib/screens/settings/widgets/blocked_users.dart b/lib/screens/settings/widgets/blocked_users.dart index bc732c4d..b4f349bc 100644 --- a/lib/screens/settings/widgets/blocked_users.dart +++ b/lib/screens/settings/widgets/blocked_users.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:frosty/core/auth/auth_store.dart'; import 'package:frosty/widgets/block_button.dart'; @@ -17,7 +18,10 @@ class BlockedUsers extends StatelessWidget { title: const Text('Blocked Users'), ), body: RefreshIndicator( - onRefresh: () => authStore.user.refreshBlockedUsers(headers: authStore.headersTwitch), + onRefresh: () async { + HapticFeedback.lightImpact(); + await authStore.user.refreshBlockedUsers(headers: authStore.headersTwitch); + }, child: Observer( builder: (context) { if (authStore.user.blockedUsers.isEmpty) { diff --git a/lib/screens/settings/widgets/profile_card.dart b/lib/screens/settings/widgets/profile_card.dart index cb13d712..ebeb1530 100644 --- a/lib/screens/settings/widgets/profile_card.dart +++ b/lib/screens/settings/widgets/profile_card.dart @@ -93,7 +93,7 @@ class ProfileCard extends StatelessWidget { size: 40, ), title: const Text('Anonymous User'), - subtitle: const Text('Log in with to view your followed streams, send chat messages, and more.'), + subtitle: const Text('Log in to view your followed streams, send chat messages, and more.'), trailing: OutlinedButton( onPressed: () => _showLoginDialog(context), child: const Text('Log In'),