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) :
|
||||
AbstractSetting() {
|
||||
@JvmField
|
||||
@Volatile
|
||||
internal var lastAutoSaveJob: Job? = null
|
||||
|
||||
@JvmField
|
||||
@Volatile
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user