mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 18:51:51 +01:00
Fixed search placeholder + restore wakelock
This commit is contained in:
parent
f475a0882b
commit
36c513b4c4
@ -30,6 +30,7 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
|||||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||||
import eu.kanade.tachiyomi.source.SourceNotFoundException
|
import eu.kanade.tachiyomi.source.SourceNotFoundException
|
||||||
|
import eu.kanade.tachiyomi.util.chop
|
||||||
import eu.kanade.tachiyomi.util.getUriCompat
|
import eu.kanade.tachiyomi.util.getUriCompat
|
||||||
import eu.kanade.tachiyomi.util.isServiceRunning
|
import eu.kanade.tachiyomi.util.isServiceRunning
|
||||||
import eu.kanade.tachiyomi.util.notificationManager
|
import eu.kanade.tachiyomi.util.notificationManager
|
||||||
@ -116,7 +117,7 @@ class BackupRestoreService : Service() {
|
|||||||
startForeground(Notifications.ID_RESTORE_PROGRESS, progressNotification.build())
|
startForeground(Notifications.ID_RESTORE_PROGRESS, progressNotification.build())
|
||||||
wakeLock = (getSystemService(Context.POWER_SERVICE) as PowerManager).newWakeLock(
|
wakeLock = (getSystemService(Context.POWER_SERVICE) as PowerManager).newWakeLock(
|
||||||
PowerManager.PARTIAL_WAKE_LOCK, "BackupRestoreService:WakeLock")
|
PowerManager.PARTIAL_WAKE_LOCK, "BackupRestoreService:WakeLock")
|
||||||
wakeLock.acquire(10 * 60 * 1000L /*10 minutes*/)
|
wakeLock.acquire()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -363,7 +364,9 @@ class BackupRestoreService : Service() {
|
|||||||
*/
|
*/
|
||||||
private fun showProgressNotification(current: Int, total: Int, title: String) {
|
private fun showProgressNotification(current: Int, total: Int, title: String) {
|
||||||
notificationManager.notify(Notifications.ID_RESTORE_PROGRESS, progressNotification
|
notificationManager.notify(Notifications.ID_RESTORE_PROGRESS, progressNotification
|
||||||
.setContentTitle(title)
|
.setContentTitle(title.chop(30))
|
||||||
|
.setContentText(getString(R.string.backup_restoring_progress, restoreProgress,
|
||||||
|
totalAmount))
|
||||||
.setProgress(total, current, false)
|
.setProgress(total, current, false)
|
||||||
.build())
|
.build())
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@
|
|||||||
<string name="lock_always">Always</string>
|
<string name="lock_always">Always</string>
|
||||||
<string name="lock_never">Never</string>
|
<string name="lock_never">Never</string>
|
||||||
<string name="lock_after_mins">After %1$s minutes</string>
|
<string name="lock_after_mins">After %1$s minutes</string>
|
||||||
<string name="search_hint">Search (title, tags, source)</string>
|
<string name="search_hint">Search title, tags, source</string>
|
||||||
|
|
||||||
<!-- Extension section -->
|
<!-- Extension section -->
|
||||||
<string name="all_lang">All</string>
|
<string name="all_lang">All</string>
|
||||||
@ -314,6 +314,7 @@
|
|||||||
<string name="file_saved">File saved at %1$s</string>
|
<string name="file_saved">File saved at %1$s</string>
|
||||||
<string name="backup_choice">What do you want to backup?</string>
|
<string name="backup_choice">What do you want to backup?</string>
|
||||||
<string name="restoring_backup">Restoring backup</string>
|
<string name="restoring_backup">Restoring backup</string>
|
||||||
|
<string name="backup_restoring_progress">Restoring (%1$d/%2$d)</string>
|
||||||
<string name="creating_backup">Creating backup</string>
|
<string name="creating_backup">Creating backup</string>
|
||||||
<string name="sources_missing">Sources missing: %1$d</string>
|
<string name="sources_missing">Sources missing: %1$d</string>
|
||||||
<string name="x_licensed_manga">%1$d manga are now licensed and could not be restored</string>
|
<string name="x_licensed_manga">%1$d manga are now licensed and could not be restored</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user