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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user