1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2026-08-23 14:23:04 +00:00

v1.6.1: Remove sync error notification if a good sync is done after a bad sync

This commit is contained in:
Loïc Blot (@U-Exp)
2015-01-18 17:42:38 +01:00
parent 208746d855
commit 6480b3dbbd
3 changed files with 9 additions and 2 deletions
@@ -46,6 +46,10 @@ public class OCSMSNotificationManager {
);
}
public void dropSyncErrorMsg() {
_notification.cancelNotify(OCSMSNotificationType.SYNC_FAILED);
}
public void setDebugMsg(String errMsg) {
createNotificationIfPossible(OCSMSNotificationType.DEBUG,
"DEBUG", errMsg
@@ -58,6 +58,8 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter {
// and push datas
_client.doPushRequest(null);
nMgr.dropSyncErrorMsg();
} catch (OCSyncException e) {
nMgr.setSyncErrorMsg(getContext().getString(e.getErrorId()));
if (e.getErrorType() == OCSyncErrorType.IO) {
@@ -75,6 +77,7 @@ public class SmsSyncAdapter extends AbstractThreadedSyncAdapter {
}
nMgr.dropSyncProcessMsg();
}
private AccountManager _accountMgr;