From 843931c07972263a03aca686446ab4a5291f8c04 Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 2 Jun 2023 20:12:28 -0400 Subject: [PATCH 001/394] Fix chat autocomplete not updating (#267) --- .../channel/chat/stores/chat_store.dart | 14 ++++++++----- .../channel/chat/stores/chat_store.g.dart | 18 ++++++++++++++++ .../channel/chat/widgets/chat_bottom_bar.dart | 21 ++++++++++++------- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/lib/screens/channel/chat/stores/chat_store.dart b/lib/screens/channel/chat/stores/chat_store.dart index 493aebd6..0094f775 100644 --- a/lib/screens/channel/chat/stores/chat_store.dart +++ b/lib/screens/channel/chat/stores/chat_store.dart @@ -127,6 +127,9 @@ abstract class ChatStoreBase with Store { @readonly var _autoScroll = true; + @readonly + var _inputText = ''; + @readonly var _showSendButton = false; @@ -204,12 +207,13 @@ abstract class ChatStoreBase with Store { // Add a listener to the textfield that will show/hide the autocomplete bar if focused. // Will also rebuild the autocomplete bar when typing, refreshing the results as the user types. - textController.addListener(() => _showEmoteAutocomplete = - !_showMentionAutocomplete && - textFieldFocusNode.hasFocus && - textController.text.split(' ').last.isNotEmpty); - textController.addListener(() { + _inputText = textController.text; + + _showEmoteAutocomplete = !_showMentionAutocomplete && + textFieldFocusNode.hasFocus && + textController.text.split(' ').last.isNotEmpty; + _showSendButton = textController.text.isNotEmpty; _showMentionAutocomplete = textFieldFocusNode.hasFocus && textController.text.split(' ').last.startsWith('@'); diff --git a/lib/screens/channel/chat/stores/chat_store.g.dart b/lib/screens/channel/chat/stores/chat_store.g.dart index 39a130ca..042a70d7 100644 --- a/lib/screens/channel/chat/stores/chat_store.g.dart +++ b/lib/screens/channel/chat/stores/chat_store.g.dart @@ -119,6 +119,24 @@ mixin _$ChatStore on ChatStoreBase, Store { }); } + late final _$_inputTextAtom = + Atom(name: 'ChatStoreBase._inputText', context: context); + + String get inputText { + _$_inputTextAtom.reportRead(); + return super._inputText; + } + + @override + String get _inputText => inputText; + + @override + set _inputText(String value) { + _$_inputTextAtom.reportWrite(value, super._inputText, () { + super._inputText = value; + }); + } + late final _$_showSendButtonAtom = Atom(name: 'ChatStoreBase._showSendButton', context: context); diff --git a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart index 9c8d7de4..d40aff4b 100644 --- a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart +++ b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart @@ -39,16 +39,23 @@ class ChatBottomBar extends StatelessWidget { ...chatStore.assetsStore.ffzEmotes, ...chatStore.assetsStore.sevenTVEmotes ] - .where((emote) => emote.name.toLowerCase().contains( - chatStore.textController.text.split(' ').last.toLowerCase())) + .where( + (emote) => emote.name.toLowerCase().contains( + chatStore.inputText.split(' ').last.toLowerCase(), + ), + ) .toList(); final matchingChatters = chatStore.chatDetailsStore.chatUsers - .where((chatter) => chatter.contains(chatStore.textController.text - .split(' ') - .last - .replaceFirst('@', '') - .toLowerCase())) + .where( + (chatter) => chatter.contains( + chatStore.inputText + .split(' ') + .last + .replaceFirst('@', '') + .toLowerCase(), + ), + ) .toList(); return Column( From d41b9ffcea20530bdfa894b938dac49cf648f172 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Fri, 2 Jun 2023 20:28:00 -0400 Subject: [PATCH 002/394] Upgrade packages --- pubspec.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 67a237b0..9ce1b733 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.0" collection: dependency: "direct main" description: @@ -620,10 +620,10 @@ packages: dependency: transitive description: name: lints - sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" logging: dependency: transitive description: @@ -1082,10 +1082,10 @@ packages: dependency: transitive description: name: universal_io - sha256: "06866290206d196064fd61df4c7aea1ffe9a4e7c4ccaa8fcded42dd41948005d" + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" url_launcher: dependency: "direct main" description: From f12355ad7aefaf7bfac826ee5b04134e347a8cb3 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Fri, 2 Jun 2023 20:30:18 -0400 Subject: [PATCH 003/394] Bump version to 3.1.3 --- android/fastlane/metadata/android/en-US/changelogs/39.txt | 2 ++ ios/fastlane/metadata/en-US/release_notes.txt | 2 +- pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 android/fastlane/metadata/android/en-US/changelogs/39.txt diff --git a/android/fastlane/metadata/android/en-US/changelogs/39.txt b/android/fastlane/metadata/android/en-US/changelogs/39.txt new file mode 100644 index 00000000..d8fe624c --- /dev/null +++ b/android/fastlane/metadata/android/en-US/changelogs/39.txt @@ -0,0 +1,2 @@ +Bug Fixes +• Fixed emote/mention autocomplete not updating \ No newline at end of file diff --git a/ios/fastlane/metadata/en-US/release_notes.txt b/ios/fastlane/metadata/en-US/release_notes.txt index 18d3aa08..d8fe624c 100644 --- a/ios/fastlane/metadata/en-US/release_notes.txt +++ b/ios/fastlane/metadata/en-US/release_notes.txt @@ -1,2 +1,2 @@ Bug Fixes -• Fixed video streams not loading \ No newline at end of file +• Fixed emote/mention autocomplete not updating \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 91063764..591027d1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 3.1.2+38 +version: 3.1.3+39 environment: sdk: '>=3.0.0 <4.0.0' From 698fe8d05d0d18d4601c96fa53a6e8c8c125354f Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 19 Jun 2023 22:02:18 -0400 Subject: [PATCH 004/394] Fix audio playing in chat-only mode (#272) * Rely on widget lifecycle for video * Remove old comments * Remove unnecessary webview reload * Fix js exceptions --- lib/screens/channel/video/video.dart | 7 +++ lib/screens/channel/video/video_store.dart | 60 ++++++++++------------ 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/lib/screens/channel/video/video.dart b/lib/screens/channel/video/video.dart index fe8963fe..b18c0bd4 100644 --- a/lib/screens/channel/video/video.dart +++ b/lib/screens/channel/video/video.dart @@ -22,6 +22,10 @@ class _VideoState extends State