diff options
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java | 13 | ||||
-rw-r--r-- | fastlane/metadata/android/en-US/changelogs/6.txt | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java index 5e5f693a7..5d6872856 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java @@ -161,7 +161,18 @@ public class MainActivity extends DrawerActivity { b.setColor(colorToSet); //TODO: returns liveData of the created board (once!) as desired // original to do: on createBoard: should return ID of the created board, so one can immediately switch to the new board after creation - syncManager.createBoard(account.getId(), b); + LiveData<FullBoard> createBoardLiveData = syncManager.createBoard(account.getId(), b); + Observer<FullBoard> createBoardObserver = new Observer<FullBoard>() { + @Override + public void onChanged(FullBoard board) { + boardsList.add(board.getBoard()); + currentBoardId = board.getLocalId(); + buildSidenavMenu(); + createBoardLiveData.removeObserver(this); + + } + }; + createBoardLiveData.observe(this, createBoardObserver); } public void onUpdateBoard(FullBoard fullBoard) { diff --git a/fastlane/metadata/android/en-US/changelogs/6.txt b/fastlane/metadata/android/en-US/changelogs/6.txt index c59d9b634..36d082c57 100644 --- a/fastlane/metadata/android/en-US/changelogs/6.txt +++ b/fastlane/metadata/android/en-US/changelogs/6.txt @@ -1 +1 @@ -d
\ No newline at end of file +- Fix NPE when edit a board with a non default color
\ No newline at end of file |