Skip to content

Commit

Permalink
(search) Fix random searching bug
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Aug 1, 2021
1 parent b6cbaa8 commit de61c55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/component/hentai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class HentaiManager {
// static double _latestSeed = 0;
static Future<Tuple2<List<QueryResult>, int>> _randomSearch(String what,
[int offset = 0]) async {
final wwhat = what.split(' ').where((x) => x != 'random').join(' ');
var wwhat = what.split(' ').where((x) => x != 'random').join(' ');
var seed = -1.0;
if (what.split(' ').where((x) => x.startsWith('random:')).length > 0) {
var tseed = what
Expand All @@ -104,6 +104,8 @@ class HentaiManager {
.last;
seed = double.tryParse(tseed);

wwhat = what.split(' ').where((x) => !x.startsWith('random:')).join(' ');

if (seed == null) {
Logger.error('[hentai-randomSearch] E: Seed must be double type!');

Expand Down

0 comments on commit de61c55

Please sign in to comment.