diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-10-16 12:44:43 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-10-16 12:44:43 +0300 |
commit | 3159c4dfdeddd386fb7af586b44c4fd03894550b (patch) | |
tree | 51f0caa3dfc3766ae0d65016a58d4cf0db62196d /app | |
parent | 363732790447cfefb3054c8f9f0feb2272da55bc (diff) |
Fix build
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java index 0c9bc569..2e86d64f 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java @@ -26,7 +26,6 @@ import androidx.core.graphics.drawable.DrawableCompat; import androidx.core.view.GravityCompat; import androidx.core.view.ViewCompat; import androidx.lifecycle.LiveData; -import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -750,7 +749,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A @Override public void onAccountDeleted(Account localAccount) { - LiveData<Void> deleteLiveData = db.deleteAccount(localAccount); + final LiveData<Void> deleteLiveData = db.deleteAccount(localAccount); deleteLiveData.observe(this, (v) -> { if (localAccount.getId() == this.localAccount.getId()) { List<Account> remainingAccounts = db.getAccountDao().getAccounts(); @@ -776,10 +775,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A @Override public void onCategoryChosen(String category) { for (Integer i : new ArrayList<>(adapter.getSelected())) { - NoteWithCategory note = (NoteWithCategory) adapter.getItem(i); - db.setCategory(ssoAccount, localAccount.getId(), note.getId(), category); + db.setCategory(ssoAccount, localAccount.getId(), ((NoteWithCategory) adapter.getItem(i)).getId(), category); } - - mActionMode.finish(); } } |