Skip to content

Commit 2187238

Browse files
committed
update widget text color when appropriate
1 parent 3c368db commit 2187238

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/adapters/WidgetAdapter.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import com.simplemobiletools.notes.helpers.OPEN_NOTE_ID
1919

2020
class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsService.RemoteViewsFactory {
2121
private val textIds = arrayOf(R.id.widget_text_left, R.id.widget_text_center, R.id.widget_text_right)
22-
private val widgetTextColor = context.config.widgetTextColor
22+
private var widgetTextColor = context.config.widgetTextColor
2323

2424
override fun getViewAt(position: Int): RemoteViews {
2525
val noteId = intent.getIntExtra(NOTE_ID, 1)
@@ -58,7 +58,9 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
5858

5959
override fun getItemId(position: Int) = position.toLong()
6060

61-
override fun onDataSetChanged() {}
61+
override fun onDataSetChanged() {
62+
widgetTextColor = context.config.widgetTextColor
63+
}
6264

6365
override fun hasStableIds() = true
6466

0 commit comments

Comments
 (0)