mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Cleanup comment
This commit is contained in:
parent
40db23d341
commit
4992123baf
@ -40,12 +40,16 @@ class VersionDataFetcher @Inject constructor(
|
||||
|
||||
private val scope = CoroutineScope(Dispatchers.Default)
|
||||
|
||||
/**
|
||||
* Schedules fetching version data [delayMillis] milliseconds from now.
|
||||
*
|
||||
* This method will fetch immediately if 4 hours or more has elapsed since the last successful
|
||||
* check.
|
||||
*/
|
||||
fun startTimedVersionCheck(
|
||||
delayMillis: Long = REFRESH_TIME_MS + prefs.getLastVersionCheck() - System.currentTimeMillis()
|
||||
) {
|
||||
stopTimedVersionCheck()
|
||||
|
||||
// Call immediately if 4h or more has elapsed since the last successful check else schedule.
|
||||
handler.postDelayed(fetchVersionData, delayMillis)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user