diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-13 15:42:03 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-13 15:42:03 +0300 |
commit | 39e45a5c0106ad05d34872b0343801807bc3faa0 (patch) | |
tree | 925b75fa826339ba7c6c574a9ac1e1eb8b2cab4f /app/src/main/java/it/niedermann/nextcloud | |
parent | e0f968d040653b9c6f344a2644da87717091c551 (diff) |
#455 ➕ Clone boards with existing stacks and labels - Allow edit board after clone
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java | 4 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java | 2 |
2 files changed, 4 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 a6a208c55..ce4c279a0 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 @@ -986,7 +986,6 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener binding.drawerLayout.closeDrawer(GravityCompat.START); final Snackbar snackbar = BrandedSnackbar.make(binding.coordinatorLayout, getString(R.string.cloning_board, board.getTitle()), Snackbar.LENGTH_INDEFINITE); snackbar.show(); - // FIXME: no need for this anymore: R.string.cloned_board final WrappedLiveData<FullBoard> liveData = syncManager.cloneBoard(board.getAccountId(), board.getLocalId(), board.getAccountId(), board.getColor()); observeOnce(liveData, this, (fullBoard -> { snackbar.dismiss(); @@ -994,6 +993,9 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener ExceptionDialogFragment.newInstance(liveData.getError(), mainViewModel.getCurrentAccount()).show(getSupportFragmentManager(), ExceptionDialogFragment.class.getSimpleName()); } else { setCurrentBoard(fullBoard.getBoard()); + BrandedSnackbar.make(binding.coordinatorLayout, getString(R.string.successfully_cloned_board, fullBoard.getBoard().getTitle()), Snackbar.LENGTH_LONG) + .setAction(R.string.edit, v -> EditBoardDialogFragment.newInstance(fullBoard.getLocalId()).show(getSupportFragmentManager(), EditBoardDialogFragment.class.getSimpleName())) + .show(); } })); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java index 20e6f8dc8..8f7219b11 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/branding/BrandedSnackbar.java @@ -27,7 +27,7 @@ public class BrandedSnackbar { @ColorInt final int color = readBrandMainColor(view.getContext()); snackbar.setActionTextColor(ColorUtil.isColorDark(color) ? Color.WHITE : color); } else { - snackbar.setActionTextColor(ContextCompat.getColor(view.getContext(), R.color.primary)); + snackbar.setActionTextColor(ContextCompat.getColor(view.getContext(), R.color.defaultBrand)); } return snackbar; } |