mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-06 07:37:37 +03:00
Fix style problem
This commit is contained in:
parent
3819448945
commit
fedfb80258
@ -81,8 +81,10 @@ void SleepActivity::renderCustomSleepScreen() const {
|
||||
if (numFiles > 0) {
|
||||
// Generate a random number between 1 and numFiles
|
||||
const auto randomFileIndex = random(numFiles);
|
||||
// If we re-generated the same index as the last sleep screen, use the next one (modulo the number of files we have)
|
||||
const auto realFileIndex = randomFileIndex == SETTINGS.lastUsedSleep? randomFileIndex+1 % numFiles : randomFileIndex;
|
||||
// If we re-generated the same index as the last sleep screen,
|
||||
// use the next one (modulo the number of files we have)
|
||||
const auto realFileIndex =
|
||||
randomFileIndex == SETTINGS.lastUsedSleep ? randomFileIndex + 1 % numFiles : randomFileIndex;
|
||||
SETTINGS.lastUsedSleep = realFileIndex;
|
||||
SETTINGS.saveToFile();
|
||||
const auto filename = "/sleep/" + files[realFileIndex];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user