MOBILE-2632 message: Fix delay when syncing messages
parent
f09906bc95
commit
b125dcdbc9
|
@ -222,7 +222,9 @@ export class AddonMessagesSyncProvider extends CoreSyncBaseProvider {
|
||||||
// In some Moodle versions, wait 1 second to make sure timecreated is different.
|
// In some Moodle versions, wait 1 second to make sure timecreated is different.
|
||||||
// This is because there was a bug where messages with the same timecreated had a wrong order.
|
// This is because there was a bug where messages with the same timecreated had a wrong order.
|
||||||
if (!groupMessagingEnabled && index < messages.length - 1) {
|
if (!groupMessagingEnabled && index < messages.length - 1) {
|
||||||
return setTimeout(() => {return; }, 1000);
|
return new Promise((resolve, reject): any => {
|
||||||
|
setTimeout(resolve, 1000);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue