mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Misc improvements
This commit is contained in:
parent
0a50674f67
commit
561df66d1c
@ -112,9 +112,11 @@ public interface AutoSaveSettingHolder : SettingHolder, CoroutineScope {
|
|||||||
*/
|
*/
|
||||||
public open class AutoSaveSetting(private val owner: AutoSaveSettingHolder, private val storage: SettingStorage) :
|
public open class AutoSaveSetting(private val owner: AutoSaveSettingHolder, private val storage: SettingStorage) :
|
||||||
AbstractSetting() {
|
AbstractSetting() {
|
||||||
|
@JvmField
|
||||||
@Volatile
|
@Volatile
|
||||||
internal var lastAutoSaveJob: Job? = null
|
internal var lastAutoSaveJob: Job? = null
|
||||||
|
|
||||||
|
@JvmField
|
||||||
@Volatile
|
@Volatile
|
||||||
internal var currentFirstStartTime = atomic(0L)
|
internal var currentFirstStartTime = atomic(0L)
|
||||||
|
|
||||||
@ -137,7 +139,7 @@ public interface AutoSaveSettingHolder : SettingHolder, CoroutineScope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final override fun onValueChanged(value: Value<*>) {
|
public final override fun onValueChanged(value: Value<*>) {
|
||||||
lastAutoSaveJob = owner.launch(block = updaterBlock)
|
lastAutoSaveJob = owner.launch(block = updaterBlock)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user