Skip to content

Commit

Permalink
Don't show LeelaOdds featured bots for now
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Jun 28, 2024
1 parent 01ae426 commit 1caccf5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/src/view/play/online_bots_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,25 @@ import 'package:url_launcher/url_launcher.dart';

part 'online_bots_screen.g.dart';

// TODO(#796): remove when Leela featured bots special challenges are ready
// https://github.com/lichess-org/mobile/issues/796
const _disabledBots = {
'leelaknightodds',
'leelaqueenodds',
'leelaqueenforknight',
'leelarookodds',
};

@riverpod
Future<IList<User>> _onlineBots(_OnlineBotsRef ref) async {
return ref.withClientCacheFor(
(client) => UserRepository(client).getOnlineBots(),
(client) => UserRepository(client).getOnlineBots().then(
(bots) => bots
.whereNot(
(bot) => _disabledBots.contains(bot.id.value.toLowerCase()),
)
.toIList(),
),
const Duration(hours: 5),
);
}
Expand Down

0 comments on commit 1caccf5

Please sign in to comment.