use a random new title, if highlights is empty
This commit is contained in:
parent
f4518056db
commit
bba642e9e3
|
@ -32,6 +32,7 @@ import org.mosad.teapod.util.*
|
||||||
import org.mosad.teapod.util.DataTypes.MediaType
|
import org.mosad.teapod.util.DataTypes.MediaType
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import kotlin.random.Random
|
||||||
|
|
||||||
object AoDParser {
|
object AoDParser {
|
||||||
|
|
||||||
|
@ -247,6 +248,10 @@ object AoDParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if highlights is empty, add a random new title
|
||||||
|
if (highlightsList.isEmpty()) {
|
||||||
|
highlightsList.add(newTitlesList[Random.nextInt(0, newTitlesList.size)])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue