mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-08 20:08:35 +00:00
Fix crash in RetrieveProfileJob.
This commit is contained in:
parent
4cd433b6bc
commit
dc9124f291
@ -167,6 +167,11 @@ public class RetrieveProfileJob extends BaseJob {
|
|||||||
* certain time period.
|
* certain time period.
|
||||||
*/
|
*/
|
||||||
public static void enqueueRoutineFetchIfNecessary(Application application) {
|
public static void enqueueRoutineFetchIfNecessary(Application application) {
|
||||||
|
if (!SignalStore.registrationValues().isRegistrationComplete()) {
|
||||||
|
Log.i(TAG, "Registration not complete. Skipping.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
long timeSinceRefresh = System.currentTimeMillis() - SignalStore.misc().getLastProfileRefreshTime();
|
long timeSinceRefresh = System.currentTimeMillis() - SignalStore.misc().getLastProfileRefreshTime();
|
||||||
if (timeSinceRefresh < TimeUnit.HOURS.toMillis(12)) {
|
if (timeSinceRefresh < TimeUnit.HOURS.toMillis(12)) {
|
||||||
Log.i(TAG, "Too soon to refresh. Did the last refresh " + timeSinceRefresh + " ms ago.");
|
Log.i(TAG, "Too soon to refresh. Did the last refresh " + timeSinceRefresh + " ms ago.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user