diff options
author | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-10-03 23:47:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 23:47:12 +0300 |
commit | 04d85196c4dc37b5ab237191d9f73792fb33a484 (patch) | |
tree | c1fd5e6e10034b335b35680c4d517369a7e2234f /app/src/main/java/it/niedermann/nextcloud/deck/ui/widget | |
parent | 8e0b4546aa33b3215a394e55a8fbee33f72621fb (diff) |
🎨 Store colors as integer in database (#603)
* #556 Store colors as integer in database - UI should only use @ColorInt from model
* Merge master
Signed-off-by: Stefan Niedermann <info@niedermann.it>
* #556 Store colors as integer in database
Signed-off-by: Stefan Niedermann <info@niedermann.it>
* #556 Store colors as integer in database
Signed-off-by: Stefan Niedermann <info@niedermann.it>
* merged into branch
Co-authored-by: desperateCoder <echotodevnull@gmail.com>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/widget')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java index bc275e906..87f357e20 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java @@ -4,7 +4,6 @@ import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.graphics.Color; import android.net.Uri; import android.widget.RemoteViews; import android.widget.RemoteViewsService; @@ -57,8 +56,7 @@ public class StackWidgetFactory implements RemoteViewsService.RemoteViewsFactory LiveData<FullBoard> fullBoardLiveData = syncManager.getFullBoardById(accountId, stack.getStack().getBoardId()); fullBoardLiveData.observeForever((FullBoard fullBoard) -> { if (fullBoard != null) { - final String boardColor = fullBoard.getBoard().getColor(); - views.setInt(R.id.widget_stack_header_icon, "setColorFilter", Color.parseColor("#" + boardColor)); + views.setInt(R.id.widget_stack_header_icon, "setColorFilter", fullBoard.getBoard().getColor()); notifyAppWidgetUpdate(views); } }); |