Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Apr 12, 2024
1 parent 326aabf commit 3ed4ffc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 50 deletions.
4 changes: 4 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890
50 changes: 25 additions & 25 deletions lib/src/view/game/game_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,37 +458,37 @@ class ExtendedGameListTile extends StatelessWidget {
final LightArchivedGame game;
final UserId? userId;

Widget getResultIcon(LightArchivedGame game, Side mySide) {
if (game.status == GameStatus.aborted ||
game.status == GameStatus.noStart) {
return const Icon(
CupertinoIcons.xmark_square_fill,
color: LichessColors.grey,
);
} else {
return game.winner == null
? const Icon(
CupertinoIcons.equal_square_fill,
color: LichessColors.brag,
)
: game.winner == mySide
? const Icon(
CupertinoIcons.plus_square_fill,
color: LichessColors.good,
)
: const Icon(
CupertinoIcons.minus_square_fill,
color: LichessColors.red,
);
}
}

@override
Widget build(BuildContext context) {
final mySide = game.white.user?.id == userId ? Side.white : Side.black;
final me = game.white.user?.id == userId ? game.white : game.black;
final opponent = game.white.user?.id == userId ? game.black : game.white;

Widget getResultIcon(LightArchivedGame game, Side mySide) {
if (game.status == GameStatus.aborted ||
game.status == GameStatus.noStart) {
return const Icon(
CupertinoIcons.xmark_square_fill,
color: LichessColors.grey,
);
} else {
return game.winner == null
? Icon(
CupertinoIcons.equal_square_fill,
color: context.lichessColors.brag,
)
: game.winner == mySide
? Icon(
CupertinoIcons.plus_square_fill,
color: context.lichessColors.good,
)
: Icon(
CupertinoIcons.minus_square_fill,
color: context.lichessColors.error,
);
}
}

return GameListTile(
game: game,
mySide: userId == game.white.user?.id ? Side.white : Side.black,
Expand Down
25 changes: 0 additions & 25 deletions lib/src/view/user/recent_games.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,6 @@ class RecentGames extends ConsumerWidget {

final userId = user?.id ?? ref.watch(authSessionProvider)?.user.id;

Widget getResultIcon(LightArchivedGame game, Side mySide) {
if (game.status == GameStatus.aborted ||
game.status == GameStatus.noStart) {
return const Icon(
CupertinoIcons.xmark_square_fill,
color: LichessColors.grey,
);
} else {
return game.winner == null
? Icon(
CupertinoIcons.equal_square_fill,
color: context.lichessColors.brag,
)
: game.winner == mySide
? Icon(
CupertinoIcons.plus_square_fill,
color: context.lichessColors.good,
)
: Icon(
CupertinoIcons.minus_square_fill,
color: context.lichessColors.error,
);
}
}

return recentGames.when(
data: (data) {
if (data.isEmpty) {
Expand Down

0 comments on commit 3ed4ffc

Please sign in to comment.