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

Sync now: add a toast to give feedback about nothing to sync

SmsSyncAdapter: make android studio happy

Drop .observers.SmsObserverService which is unused
This commit is contained in:
Loic Blot
2016-08-29 00:31:44 +02:00
parent 08b54f8aa0
commit c934f0deeb
6 changed files with 15 additions and 13 deletions
@@ -134,7 +134,6 @@ public class MainActivity extends AppCompatActivity
}
Context ctx = getApplicationContext();
if (MainActivity.mConnectivityMonitor.isValid()) {
// Now fetch messages since last stored date
JSONArray smsList = new JSONArray();
@@ -145,6 +144,9 @@ public class MainActivity extends AppCompatActivity
ctx.getString(R.string.sync_inprogress), OCSMSNotificationType.SYNC.ordinal());
new SyncTask(getApplicationContext(), smsList).execute();
}
else {
Toast.makeText(ctx, ctx.getString(R.string.nothing_to_sync), Toast.LENGTH_SHORT).show();
}
}
else {
Toast.makeText(ctx, ctx.getString(R.string.err_sync_no_connection_available), Toast.LENGTH_SHORT).show();