Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c258644a authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Fix crash when using .max function

parent 2bb7016b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class BackupPresenter @Inject constructor(
                .distinctUntilChanged()
                .switchMap { backupRepo.getBackups() }
                .doOnNext { backups -> newState { copy(backups = backups) } }
                .map { backups -> backups.map { it.date }.max() ?: 0L }
                .map { backups -> backups.maxOfOrNull { it.date } ?: 0L }
                .map { lastBackup ->
                    when (lastBackup) {
                        0L -> context.getString(R.string.backup_never)