Skip to content

Commit

Permalink
Merge upstream to fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
julien4215 committed Feb 12, 2025
2 parents 9c89e76 + 034a9de commit 7edcb7d
Show file tree
Hide file tree
Showing 190 changed files with 7,711 additions and 4,829 deletions.
2 changes: 1 addition & 1 deletion COPYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Fontawesome in assets/fonts | [davegandy](https://fontawesome.com) | [SIL OFL 1.
External services
-----------------

Lichobile relies on these external services:
Lichess Mobile relies on these external services:

* [lichess.org](https://lichess.org)
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
**/.cxx
23 changes: 19 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules">

<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_lichess_notification" />
Expand Down Expand Up @@ -54,6 +50,25 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https" android:host="lichess.org" />

<data android:pathPattern="/training/....." />
<data android:pathPattern="/study/........" />

<data android:path="/storm" />
<data android:path="/streak" />

<!-- Either game or challenge -->
<data android:pathPattern="/........" />
<data android:pathPattern="/......../black" />
<data android:pathPattern="/......../white" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.1.0' apply false
id "com.android.application" version '8.6.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.21" apply false
id "com.google.gms.google-services" version "4.4.0" apply false
id "com.google.firebase.crashlytics" version "2.9.9" apply false
Expand Down
2 changes: 1 addition & 1 deletion docs/setting_dev_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ flutter run \
> Do not use any scheme (https:// or ws://) in url in host, since it's already handled by URI helper method
> [!NOTE]
> You can also use the production server but note that you will not be able to log in.
> If you use the production server, note that you will not be able to log in.
### Android

Expand Down
93 changes: 49 additions & 44 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,65 @@ PODS:
- AppAuth/Core
- connectivity_plus (0.0.1):
- Flutter
- FlutterMacOS
- cupertino_http (0.0.1):
- Flutter
- FlutterMacOS
- device_info_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (11.6.0):
- FirebaseCore (~> 11.6.0)
- Firebase/Crashlytics (11.6.0):
- Firebase/CoreOnly (11.7.0):
- FirebaseCore (~> 11.7.0)
- Firebase/Crashlytics (11.7.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 11.6.0)
- Firebase/Messaging (11.6.0):
- FirebaseCrashlytics (~> 11.7.0)
- Firebase/Messaging (11.7.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 11.6.0)
- firebase_core (3.10.1):
- Firebase/CoreOnly (= 11.6.0)
- FirebaseMessaging (~> 11.7.0)
- firebase_core (3.11.0):
- Firebase/CoreOnly (= 11.7.0)
- Flutter
- firebase_crashlytics (4.3.1):
- Firebase/Crashlytics (= 11.6.0)
- firebase_crashlytics (4.3.2):
- Firebase/Crashlytics (= 11.7.0)
- firebase_core
- Flutter
- firebase_messaging (15.2.1):
- Firebase/Messaging (= 11.6.0)
- firebase_messaging (15.2.2):
- Firebase/Messaging (= 11.7.0)
- firebase_core
- Flutter
- FirebaseCore (11.6.0):
- FirebaseCoreInternal (~> 11.6.0)
- FirebaseCore (11.7.0):
- FirebaseCoreInternal (~> 11.7.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.6.0):
- FirebaseCore (~> 11.6.0)
- FirebaseCoreInternal (11.6.0):
- FirebaseCoreExtension (11.7.0):
- FirebaseCore (~> 11.7.0)
- FirebaseCoreInternal (11.7.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseCrashlytics (11.6.0):
- FirebaseCore (~> 11.6.0)
- FirebaseCrashlytics (11.7.0):
- FirebaseCore (~> 11.7.0)
- FirebaseInstallations (~> 11.0)
- FirebaseRemoteConfigInterop (~> 11.0)
- FirebaseSessions (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/Environment (~> 8.0)
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
- FirebaseInstallations (11.6.0):
- FirebaseCore (~> 11.6.0)
- FirebaseInstallations (11.7.0):
- FirebaseCore (~> 11.7.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (11.6.0):
- FirebaseCore (~> 11.6.0)
- FirebaseMessaging (11.7.0):
- FirebaseCore (~> 11.7.0)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Reachability (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- FirebaseRemoteConfigInterop (11.6.0)
- FirebaseSessions (11.6.0):
- FirebaseCore (~> 11.6.0)
- FirebaseCoreExtension (~> 11.6.0)
- FirebaseRemoteConfigInterop (11.8.0)
- FirebaseSessions (11.7.0):
- FirebaseCore (~> 11.7.0)
- FirebaseCoreExtension (~> 11.7.0)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/Environment (~> 8.0)
Expand Down Expand Up @@ -112,6 +111,8 @@ PODS:
- GoogleUtilities/UserDefaults (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- image_picker_ios (0.0.1):
- Flutter
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
Expand Down Expand Up @@ -146,7 +147,7 @@ PODS:

DEPENDENCIES:
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- cupertino_http (from `.symlinks/plugins/cupertino_http/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
Expand All @@ -157,6 +158,7 @@ DEPENDENCIES:
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- objective_c (from `.symlinks/plugins/objective_c/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
Expand Down Expand Up @@ -190,7 +192,7 @@ EXTERNAL SOURCES:
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/darwin"
:path: ".symlinks/plugins/connectivity_plus/ios"
cupertino_http:
:path: ".symlinks/plugins/cupertino_http/darwin"
device_info_plus:
Expand All @@ -211,6 +213,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
objective_c:
:path: ".symlinks/plugins/objective_c/ios"
package_info_plus:
Expand All @@ -233,30 +237,31 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/wakelock_plus/ios"

SPEC CHECKSUMS:
app_settings: 3507c575c2b18a462c99948f61d5de21d4420999
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
connectivity_plus: 2256d3e20624a7749ed21653aafe291a46446fee
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
Firebase: 374a441a91ead896215703a674d58cdb3e9d772b
firebase_core: d3deb82d05dac4bc13190f9d1770787fd6a1cda4
firebase_crashlytics: 4c7c77cf1825b70b031fef62e99441c3a423eaa2
firebase_messaging: f27e82019a98ef3ea7e744b5b366fcd6b83e7f86
FirebaseCore: 48b0dd707581cf9c1a1220da68223fb0a562afaa
FirebaseCoreExtension: 2d77d6430c16cf43ca2b04608302ed02b3598361
FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
FirebaseCrashlytics: b21c665fb50138766480bce73ebdb1aa30f7f300
FirebaseInstallations: efc0946fc756e4d22d8113f7c761948120322e8c
FirebaseMessaging: e1aca1fcc23e8b9eddb0e33f375ff90944623021
FirebaseRemoteConfigInterop: e75e348953352a000331eb77caf01e424248e176
FirebaseSessions: 9529d14180868e29a8da164b3a729c036204918b
Firebase: a64bf6a8546e6eab54f1c715cd6151f39d2329f4
firebase_core: 3d36094af9b47c46bfb965943413a39eebaca4db
firebase_crashlytics: 787a6a63edce2452bc3f088b62099d70e19a3998
firebase_messaging: 5881ea6744fe41f0759bc52844c530d64f3c37e3
FirebaseCore: 3227e35f4197a924206fbcdc0349325baf4f5de4
FirebaseCoreExtension: 206c1b399f0d103055207c16f299b28e3dbd1949
FirebaseCoreInternal: d6c17dafc8dc33614733a8b52df78fcb4394c881
FirebaseCrashlytics: 785a73b624715bbc09a40bb56cdc3829a801cc98
FirebaseInstallations: 9347e719c3d52d8d7b9074b2c32407dd027305e9
FirebaseMessaging: 00ece041b71ddb52a2862ffdee73fb6e9824bd0c
FirebaseRemoteConfigInterop: 98897a64aa372eac3c5b3fe2816594ccfaac55ef
FirebaseSessions: 32ed7a9387ae71efe3a35a7f20f3a7292950957b
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_appauth: 914057fda669db5073d3ca9d94ea932e7df3c964
flutter_local_notifications: 395056b3175ba4f08480a7c5de30cd36d69827e4
flutter_native_splash: 6cad9122ea0fad137d23137dd14b937f3e90b145
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
objective_c: 89e720c30d716b036faf9c9684022048eee1eee2
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
Expand Down
3 changes: 3 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -566,6 +567,7 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -602,6 +604,7 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access Warning</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
Expand Down
30 changes: 0 additions & 30 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:lichess_mobile/src/init.dart';
import 'package:lichess_mobile/src/intl.dart';
import 'package:lichess_mobile/src/log.dart';
import 'package:lichess_mobile/src/model/common/service/sound_service.dart';
import 'package:shared_preferences/shared_preferences.dart';

Future<void> main() async {
final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
Expand All @@ -18,11 +17,6 @@ Future<void> main() async {
// See src/app.dart for splash screen removal
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);

// Old API.
// TODO: Remove this once all SharedPreferences usage is migrated to SharedPreferencesAsync.
SharedPreferences.setPrefix('lichess.');
await migrateSharedPreferences();

await lichessBinding.preloadSharedPreferences();

if (defaultTargetPlatform == TargetPlatform.android) {
Expand All @@ -43,27 +37,3 @@ Future<void> main() async {

runApp(ProviderScope(observers: [ProviderLogger()], child: const AppInitializationScreen()));
}

Future<void> migrateSharedPreferences() async {
final prefs = await SharedPreferences.getInstance();
final didMigrate = prefs.getBool('shared_preferences_did_migrate') ?? false;
if (didMigrate) {
return;
}
final newPrefs = SharedPreferencesAsync();
for (final key in prefs.getKeys()) {
final value = prefs.get(key);
if (value is String) {
await newPrefs.setString(key, value);
} else if (value is int) {
await newPrefs.setInt(key, value);
} else if (value is double) {
await newPrefs.setDouble(key, value);
} else if (value is bool) {
await newPrefs.setBool(key, value);
} else if (value is List<String>) {
await newPrefs.setStringList(key, value);
}
}
await prefs.setBool('shared_preferences_did_migrate', true);
}
Loading

0 comments on commit 7edcb7d

Please sign in to comment.