1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2025-01-19 06:26:51 -06:00

Change timetable widget date format (#530)

This commit is contained in:
Dominik Korsa 2019-10-03 15:29:33 +02:00 committed by Mikołaj Pich
parent 5b0901e311
commit 736d570f26
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package io.github.wulkanowy.ui.modules.timetable package io.github.wulkanowy.ui.modules.timetable
import android.annotation.SuppressLint
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
import io.github.wulkanowy.data.repositories.semester.SemesterRepository import io.github.wulkanowy.data.repositories.semester.SemesterRepository
import io.github.wulkanowy.data.repositories.student.StudentRepository import io.github.wulkanowy.data.repositories.student.StudentRepository
@ -147,6 +148,7 @@ class TimetablePresenter @Inject constructor(
} }
} }
@SuppressLint("DefaultLocale")
private fun reloadNavigation() { private fun reloadNavigation() {
view?.apply { view?.apply {
showPreButton(!currentDate.minusDays(1).isHolidays) showPreButton(!currentDate.minusDays(1).isHolidays)

View File

@ -140,7 +140,7 @@ class TimetableWidgetProvider : BroadcastReceiver() {
val remoteView = RemoteViews(context.packageName, layoutId).apply { val remoteView = RemoteViews(context.packageName, layoutId).apply {
setEmptyView(R.id.timetableWidgetList, R.id.timetableWidgetEmpty) setEmptyView(R.id.timetableWidgetList, R.id.timetableWidgetEmpty)
setTextViewText(R.id.timetableWidgetDate, "${date.shortcutWeekDayName.capitalize()} ${date.toFormattedString()}") setTextViewText(R.id.timetableWidgetDate, date.toFormattedString("EEEE, dd.MM").capitalize())
setTextViewText(R.id.timetableWidgetName, student?.studentName ?: context.getString(R.string.all_no_data)) setTextViewText(R.id.timetableWidgetName, student?.studentName ?: context.getString(R.string.all_no_data))
setRemoteAdapter(R.id.timetableWidgetList, adapterIntent) setRemoteAdapter(R.id.timetableWidgetList, adapterIntent)
setOnClickPendingIntent(R.id.timetableWidgetNext, nextNavIntent) setOnClickPendingIntent(R.id.timetableWidgetNext, nextNavIntent)