Skip to content

Commit

Permalink
Merge branch 'lichess-org:main' into broadcast-share
Browse files Browse the repository at this point in the history
  • Loading branch information
HaonRekcef authored Dec 11, 2024
2 parents 561c835 + c2c931f commit b1ca196
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 57 deletions.
24 changes: 12 additions & 12 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PODS:
- app_settings (5.1.1):
- Flutter
- AppAuth (1.7.5):
- AppAuth/Core (= 1.7.5)
- AppAuth/ExternalUserAgent (= 1.7.5)
- AppAuth/Core (1.7.5)
- AppAuth/ExternalUserAgent (1.7.5):
- AppAuth (1.7.6):
- AppAuth/Core (= 1.7.6)
- AppAuth/ExternalUserAgent (= 1.7.6)
- AppAuth/Core (1.7.6)
- AppAuth/ExternalUserAgent (1.7.6):
- AppAuth/Core
- connectivity_plus (0.0.1):
- Flutter
Expand Down Expand Up @@ -40,7 +40,7 @@ PODS:
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.4.1):
- FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.5.0):
- FirebaseCoreInternal (11.6.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseCrashlytics (11.4.0):
- FirebaseCore (~> 11.4)
Expand All @@ -65,7 +65,7 @@ PODS:
- GoogleUtilities/Reachability (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- FirebaseRemoteConfigInterop (11.5.0)
- FirebaseRemoteConfigInterop (11.6.0)
- FirebaseSessions (11.4.0):
- FirebaseCore (~> 11.4)
- FirebaseCoreExtension (~> 11.4)
Expand All @@ -77,7 +77,7 @@ PODS:
- PromisesSwift (~> 2.1)
- Flutter (1.0.0)
- flutter_appauth (0.0.1):
- AppAuth (= 1.7.5)
- AppAuth (= 1.7.6)
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
Expand Down Expand Up @@ -234,7 +234,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
app_settings: 3507c575c2b18a462c99948f61d5de21d4420999
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
connectivity_plus: b21496ab28d1324eb59885d888a4d83b98531f01
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
Expand All @@ -244,14 +244,14 @@ SPEC CHECKSUMS:
firebase_messaging: a538130cb2bca3ea0ff0892b8c948bd7d20ecaed
FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseMessaging: f8a160d99c2c2e5babbbcc90c4a3e15db036aee2
FirebaseRemoteConfigInterop: 7a7aebb9342d53913a5c890efa88e289d9e5c1bc
FirebaseRemoteConfigInterop: e75e348953352a000331eb77caf01e424248e176
FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_appauth: a84b3dade5e072175e13b68af5b827ca76efb1f8
flutter_appauth: 240be31017bab05dc0ad10a863886d49eba477aa
flutter_local_notifications: 395056b3175ba4f08480a7c5de30cd36d69827e4
flutter_native_splash: 576fbd69b830a63594ae678396fa17e43abbc5f8
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
Expand Down
40 changes: 6 additions & 34 deletions lib/src/view/broadcast/broadcast_players_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:lichess_mobile/src/styles/styles.dart';
import 'package:lichess_mobile/src/utils/l10n_context.dart';
import 'package:lichess_mobile/src/view/broadcast/broadcast_player_widget.dart';
import 'package:lichess_mobile/src/widgets/progression_widget.dart';
import 'package:lichess_mobile/src/widgets/shimmer.dart';

/// A tab that displays the players participating in a broadcast tournament.
class BroadcastPlayersTab extends ConsumerWidget {
Expand All @@ -35,7 +34,11 @@ class BroadcastPlayersTab extends ConsumerWidget {
child: Center(child: Text('Cannot load players data: $error')),
),
),
_ => PlayersList.loading(),
_ => const SliverFillRemaining(
child: Center(
child: CircularProgressIndicator.adaptive(),
),
),
};
}
}
Expand All @@ -52,26 +55,9 @@ const _kHeaderTextStyle =
TextStyle(fontWeight: FontWeight.bold, overflow: TextOverflow.ellipsis);

class PlayersList extends ConsumerStatefulWidget {
const PlayersList(this.players) : _isLoading = false;

PlayersList.loading()
: players = List.generate(
10,
(_) => const BroadcastPlayerExtended(
name: '',
title: null,
rating: null,
federation: null,
fideId: null,
played: 0,
score: null,
ratingDiff: null,
),
).toIList(),
_isLoading = true;
const PlayersList(this.players);

final IList<BroadcastPlayerExtended> players;
final bool _isLoading;

@override
ConsumerState<PlayersList> createState() => _PlayersListState();
Expand Down Expand Up @@ -136,20 +122,6 @@ class _PlayersListState extends ConsumerState<PlayersList> {
return SliverList.builder(
itemCount: players.length + 1,
itemBuilder: (context, index) {
if (widget._isLoading) {
return ShimmerLoading(
isLoading: true,
child: Container(
height: 50,
decoration: BoxDecoration(
color: index.isEven
? Theme.of(context).colorScheme.surfaceContainerLow
: Theme.of(context).colorScheme.surfaceContainerHigh,
),
),
);
}

if (index == 0) {
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down
20 changes: 10 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,10 @@ packages:
dependency: "direct main"
description:
name: flutter_appauth
sha256: d3fa52069464affa3e382a8d8ce7d003601643c39a9de727b98e7a84fab7fd7e
sha256: "354a9df0254ccb64b5c4031a8b2fe376b1214fb3f957f768248f4437c289308f"
url: "https://pub.dev"
source: hosted
version: "8.0.1"
version: "8.0.2"
flutter_appauth_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -823,10 +823,10 @@ packages:
dependency: transitive
description:
name: io
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
jni:
dependency: transitive
description:
Expand Down Expand Up @@ -1007,10 +1007,10 @@ packages:
dependency: transitive
description:
name: package_config
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
package_info_plus:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1055,10 +1055,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "8c4967f8b7cb46dc914e178daa29813d83ae502e0529d7b0478330616a691ef7"
sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
url: "https://pub.dev"
source: hosted
version: "2.2.14"
version: "2.2.15"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1135,10 +1135,10 @@ packages:
dependency: "direct main"
description:
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.1.5"
pubspec_parse:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: lichess_mobile
description: Lichess mobile app V2
publish_to: "none"

version: 0.13.6+001306 # See README.md for details about versioning
version: 0.13.7+001307 # See README.md for details about versioning

environment:
sdk: ">=3.5.0 <4.0.0"
Expand Down

0 comments on commit b1ca196

Please sign in to comment.