diff --git a/.gitignore b/.gitignore index 8c6cab51..61cf8b34 100644 --- a/.gitignore +++ b/.gitignore @@ -32,9 +32,6 @@ migrate_working_dir/ .pub/ /build/ -# Web related -lib/generated_plugin_registrant.dart - # Symbolication related app.*.symbols diff --git a/.metadata b/.metadata index 56bfc2c4..f991a3ab 100644 --- a/.metadata +++ b/.metadata @@ -1,10 +1,33 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled and should not be manually edited. +# This file should be version controlled. version: - revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 + revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 channel: stable project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + - platform: android + create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + - platform: ios + create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/analysis_options.yaml b/analysis_options.yaml index e06ccaf3..770b6979 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,9 +9,6 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml -analyzer: - exclude: [lib/generated_plugin_registrant.dart] - linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/android/app/build.gradle b/android/app/build.gradle index 384f0f94..51ad3adb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -37,7 +37,9 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 33 + namespace "com.tommychow.frosty" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index a0519702..399f6981 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b63d5c93..d8820da2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/res/drawable-hdpi/splash.png b/android/app/src/main/res/drawable-hdpi/splash.png index 78edba3b..59d103af 100644 Binary files a/android/app/src/main/res/drawable-hdpi/splash.png and b/android/app/src/main/res/drawable-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-mdpi/splash.png b/android/app/src/main/res/drawable-mdpi/splash.png index 65e45c48..c562000b 100644 Binary files a/android/app/src/main/res/drawable-mdpi/splash.png and b/android/app/src/main/res/drawable-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/splash.png b/android/app/src/main/res/drawable-xhdpi/splash.png index b45507c1..d8cccdac 100644 Binary files a/android/app/src/main/res/drawable-xhdpi/splash.png and b/android/app/src/main/res/drawable-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/splash.png b/android/app/src/main/res/drawable-xxhdpi/splash.png index d56cc8fd..1f1a36fa 100644 Binary files a/android/app/src/main/res/drawable-xxhdpi/splash.png and b/android/app/src/main/res/drawable-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/values-night-v31/styles.xml b/android/app/src/main/res/values-night-v31/styles.xml deleted file mode 100644 index a9464b29..00000000 --- a/android/app/src/main/res/values-night-v31/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 174b2c51..8c708bcb 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -3,7 +3,7 @@ - - - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 0d151866..0d1fa8fc 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -3,10 +3,11 @@ diff --git a/android/build.gradle b/android/build.gradle index da0e2899..fafd546e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,11 +6,11 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.3.0' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' - classpath 'com.google.firebase:perf-plugin:1.4.1' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' + classpath 'com.google.gms:google-services:4.3.15' + classpath 'com.google.firebase:perf-plugin:1.4.2' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } @@ -31,6 +31,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cc5527d7..3c472b99 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 48ebe0e8..d1fa4cce 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,55 +3,55 @@ PODS: - Flutter - device_info_plus (0.0.1): - Flutter - - Firebase/Analytics (10.7.0): + - Firebase/Analytics (10.9.0): - Firebase/Core - - Firebase/Core (10.7.0): + - Firebase/Core (10.9.0): - Firebase/CoreOnly - - FirebaseAnalytics (~> 10.7.0) - - Firebase/CoreOnly (10.7.0): - - FirebaseCore (= 10.7.0) - - Firebase/Crashlytics (10.7.0): + - FirebaseAnalytics (~> 10.9.0) + - Firebase/CoreOnly (10.9.0): + - FirebaseCore (= 10.9.0) + - Firebase/Crashlytics (10.9.0): - Firebase/CoreOnly - - FirebaseCrashlytics (~> 10.7.0) - - Firebase/Performance (10.7.0): + - FirebaseCrashlytics (~> 10.9.0) + - Firebase/Performance (10.9.0): - Firebase/CoreOnly - - FirebasePerformance (~> 10.7.0) - - firebase_analytics (10.2.1): - - Firebase/Analytics (= 10.7.0) + - FirebasePerformance (~> 10.9.0) + - firebase_analytics (10.4.1): + - Firebase/Analytics (= 10.9.0) - firebase_core - Flutter - - firebase_core (2.10.0): - - Firebase/CoreOnly (= 10.7.0) + - firebase_core (2.13.0): + - Firebase/CoreOnly (= 10.9.0) - Flutter - - firebase_crashlytics (3.1.2): - - Firebase/Crashlytics (= 10.7.0) + - firebase_crashlytics (3.3.1): + - Firebase/Crashlytics (= 10.9.0) - firebase_core - Flutter - - firebase_performance (0.9.1-1): - - Firebase/Performance (= 10.7.0) + - firebase_performance (0.9.2-1): + - Firebase/Performance (= 10.9.0) - firebase_core - Flutter - FirebaseABTesting (10.9.0): - FirebaseCore (~> 10.0) - - FirebaseAnalytics (10.7.0): - - FirebaseAnalytics/AdIdSupport (= 10.7.0) + - FirebaseAnalytics (10.9.0): + - FirebaseAnalytics/AdIdSupport (= 10.9.0) - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseAnalytics/AdIdSupport (10.7.0): + - FirebaseAnalytics/AdIdSupport (10.9.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - - GoogleAppMeasurement (= 10.7.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseCore (10.7.0): + - FirebaseCore (10.9.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Logger (~> 7.8) @@ -59,7 +59,7 @@ PODS: - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.9.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.7.0): + - FirebaseCrashlytics (10.9.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseSessions (~> 10.5) @@ -72,7 +72,7 @@ PODS: - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebasePerformance (10.7.0): + - FirebasePerformance (10.9.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfig (~> 10.0) @@ -104,27 +104,27 @@ PODS: - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) - - GoogleAppMeasurement (10.7.0): - - GoogleAppMeasurement/AdIdSupport (= 10.7.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement (10.9.0): + - GoogleAppMeasurement/AdIdSupport (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.7.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.7.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement/AdIdSupport (10.9.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 10.9.0) + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.7.0): - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/MethodSwizzler (~> 7.8) - - GoogleUtilities/Network (~> 7.8) - - "GoogleUtilities/NSData+zlib (~> 7.8)" + - GoogleAppMeasurement/WithoutAdIdSupport (10.9.0): + - GoogleUtilities/AppDelegateSwizzler (~> 7.11) + - GoogleUtilities/MethodSwizzler (~> 7.11) + - GoogleUtilities/Network (~> 7.11) + - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleDataTransport (9.2.2): + - GoogleDataTransport (9.2.3): - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) @@ -166,7 +166,7 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - sqflite (0.0.2): + - sqflite (0.0.3): - Flutter - FMDB (>= 2.7.5) - url_launcher_ios (0.0.1): @@ -188,8 +188,8 @@ DEPENDENCIES: - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - in_app_review (from `.symlinks/plugins/in_app_review/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - wakelock (from `.symlinks/plugins/wakelock/ios`) @@ -240,9 +240,9 @@ EXTERNAL SOURCES: package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/ios" + :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/ios" + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sqflite: :path: ".symlinks/plugins/sqflite/ios" url_launcher_ios: @@ -255,39 +255,39 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: advanced_in_app_review: fe8fd50b8670cb3dbe67e4c26ca643f7aea8dbb8 device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed - Firebase: 0219acf760880eeec8ce479895bd7767466d9f81 - firebase_analytics: e8e294333de66e5429d4aac365966281b4dbfb7d - firebase_core: 18d44f087248303a4a8f05d0099a000c46e3c77a - firebase_crashlytics: 621d91c0c5752e8219f8fe05a4d1e76394f4896a - firebase_performance: 7dd98298ea2f19f480efd59ccbfcad3972ced984 + Firebase: bd152f0f3d278c4060c5c71359db08ebcfd5a3e2 + firebase_analytics: 24c9089f960ea2255654488d219cb15a913adf8e + firebase_core: fc68c0f9eec4e800b9418deff14a7e0a504016f3 + firebase_crashlytics: 6c82b5f80f225b2429ebc5fdadde5b7e7735ed4e + firebase_performance: 516fbfa3ace3c84add028be727ff08f15d8a3502 FirebaseABTesting: 005b70969e2817e2a1e631e8dba29134a04c0622 - FirebaseAnalytics: f8133442ee6f8512e28ff19e62ce15398bfaeace - FirebaseCore: e317665b9d744727a97e623edbbed009320afdd7 + FirebaseAnalytics: 5ea0db4893825e7b0149d575352cd838236313dc + FirebaseCore: b68d3616526ec02e4d155166bbafb8eca64af557 FirebaseCoreExtension: d3e9bba2930a8033042112397cd9f006a1bb203d FirebaseCoreInternal: d2b4acb827908e72eca47a9fd896767c3053921e - FirebaseCrashlytics: 35fdd1a433b31e28adcf5c8933f4c526691a1e0b + FirebaseCrashlytics: b60329455285aff853e54139d8ddbfe1e5f2b9f9 FirebaseInstallations: c58489c9caacdbf27d1da60891a87318e20218e0 - FirebasePerformance: 8281bbaf08aad194001018b932115b7d58a6f00b + FirebasePerformance: eee2f5da94fd7e5d15487649f8fe10a90c87c174 FirebaseRemoteConfig: 5ea5834e8c518f377bf1af2d97ebd611914ebf2d FirebaseSessions: 44a6782502eb279a214d4adca20891353278760c Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - GoogleAppMeasurement: fe17c92a32207dd5cdd4e8d742767f2da74857f6 - GoogleDataTransport: 8378d1fa8ac49753ea6ce70d65a7cb70ce5f66e6 + GoogleAppMeasurement: 373bcbead1bb6a85be7a64d5d8f96284b762ea9c + GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e - path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852 + path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959 - shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca - sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2 + shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c + sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f + webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 519ca847..120ffc53 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -268,6 +268,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png index 65e45c48..c562000b 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png index b45507c1..d8cccdac 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png index d56cc8fd..1f1a36fa 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 2f78432e..1f5dbe5c 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -55,6 +55,6 @@ CADisableMinimumFrameDurationOnPhone UIApplicationSupportsIndirectInputEvents - - + + diff --git a/lib/apis/ffz_api.dart b/lib/apis/ffz_api.dart index e59a21e1..18f3eef0 100644 --- a/lib/apis/ffz_api.dart +++ b/lib/apis/ffz_api.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'package:frosty/models/badges.dart'; import 'package:frosty/models/emotes.dart'; import 'package:http/http.dart'; -import 'package:tuple/tuple.dart'; /// The FFZ service for making API calls. class FFZApi { @@ -36,7 +35,7 @@ class FFZApi { } /// Returns a channel's FFZ room info including custom badges and emote used. - Future>> getRoomInfo({required String id}) async { + Future<(RoomFFZ, List)> getRoomInfo({required String id}) async { final url = Uri.parse('https://api.frankerfacez.com/v1/room/id/$id'); final response = await _client.get(url); @@ -48,11 +47,12 @@ class FFZApi { final emotes = emoticons.map((emote) => EmoteFFZ.fromJson(emote)); - return Tuple2( - roomInfo, - emotes - .map((emote) => Emote.fromFFZ(emote, EmoteType.ffzChannel)) - .toList()); + return ( + roomInfo, + emotes + .map((emote) => Emote.fromFFZ(emote, EmoteType.ffzChannel)) + .toList() + ); } else { return Future.error('Failed to get FFZ room info'); } diff --git a/lib/main.dart b/lib/main.dart index f27babe6..60ec186b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:advanced_in_app_review/advanced_in_app_review.dart'; -import 'package:device_preview/device_preview.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/foundation.dart'; @@ -75,21 +74,16 @@ void main() async { await authStore.init(); runApp( - DevicePreview( - enabled: false, - builder: (context) { - return MultiProvider( - providers: [ - Provider(create: (_) => authStore), - Provider(create: (_) => settingsStore), - Provider(create: (_) => twitchApiService), - Provider(create: (_) => bttvApiService), - Provider(create: (_) => ffzApiService), - Provider(create: (_) => sevenTVApiService), - ], - child: MyApp(firstRun: firstRun), - ); - }, + MultiProvider( + providers: [ + Provider(create: (_) => authStore), + Provider(create: (_) => settingsStore), + Provider(create: (_) => twitchApiService), + Provider(create: (_) => bttvApiService), + Provider(create: (_) => ffzApiService), + Provider(create: (_) => sevenTVApiService), + ], + child: MyApp(firstRun: firstRun), ), ); } @@ -247,8 +241,6 @@ class _MyAppState extends State { final settingsStore = context.read(); return MaterialApp( - useInheritedMediaQuery: true, - locale: DevicePreview.locale(context), title: 'Frosty', theme: lightTheme, darkTheme: settingsStore.themeType == ThemeType.dark || diff --git a/lib/screens/channel/chat/stores/chat_assets_store.dart b/lib/screens/channel/chat/stores/chat_assets_store.dart index dec1329b..3c2af666 100644 --- a/lib/screens/channel/chat/stores/chat_assets_store.dart +++ b/lib/screens/channel/chat/stores/chat_assets_store.dart @@ -157,8 +157,10 @@ abstract class ChatAssetsStoreBase with Store { sevenTVApi.getEmotesGlobal().catchError(onError), sevenTVApi.getEmotesChannel(id: channelId).catchError(onError), ffzApi.getRoomInfo(id: channelId).then((ffzRoom) { - ffzRoomInfo = ffzRoom.item1; - return ffzRoom.item2; + final (roomInfo, emotes) = ffzRoom; + + ffzRoomInfo = roomInfo; + return emotes; }).catchError(onError), ]).then((assets) => assets.expand((list) => list)).then((emotes) => _emoteToObject = {for (final emote in emotes) emote.name: emote}); diff --git a/lib/screens/channel/chat/widgets/chat_message.dart b/lib/screens/channel/chat/widgets/chat_message.dart index 0ee4b72c..ea53102f 100644 --- a/lib/screens/channel/chat/widgets/chat_message.dart +++ b/lib/screens/channel/chat/widgets/chat_message.dart @@ -44,7 +44,7 @@ class ChatMessage extends StatelessWidget { Future onLongPressMessage() async { HapticFeedback.lightImpact(); - await Clipboard.setData(ClipboardData(text: ircMessage.message)); + await Clipboard.setData(ClipboardData(text: ircMessage.message ?? '')); chatStore.updateNotification('Message copied'); } diff --git a/lib/screens/channel/video/video.dart b/lib/screens/channel/video/video.dart index 60ff16ce..fe8963fe 100644 --- a/lib/screens/channel/video/video.dart +++ b/lib/screens/channel/video/video.dart @@ -37,17 +37,8 @@ class _VideoState extends State