mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-23 13:26:15 +03:00
Update sync status of note in UI after deleting and restoring it
This commit is contained in:
parent
465b1c6863
commit
27e2e4601f
1 changed files with 11 additions and 0 deletions
|
@ -598,6 +598,17 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
Log.v(TAG, "Item deleted through swipe ----------------------------------------------");
|
||||
Snackbar.make(swipeRefreshLayout, R.string.action_note_deleted, Snackbar.LENGTH_LONG)
|
||||
.setAction(R.string.action_undo, (View v) -> {
|
||||
db.getNoteServerSyncHelper().addCallbackPush(new ICallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
refreshLists();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScheduled() {
|
||||
|
||||
}
|
||||
});
|
||||
db.addNoteAndSync(dbNote.getAccountId(), dbNote);
|
||||
refreshLists();
|
||||
Snackbar.make(swipeRefreshLayout, R.string.action_note_restored, Snackbar.LENGTH_SHORT)
|
||||
|
|
Loading…
Reference in a new issue