Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd8baa1 authored by tibbi's avatar tibbi
Browse files

use the short week day letters instead of substringing

parent 91ad738e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.17.7'
        propVersionName = '3.17.8'
        kotlin_version = '1.2.31'
        support_libs = '27.1.0'
    }
+2 −2
Original line number Diff line number Diff line
@@ -364,7 +364,7 @@ fun Context.isPackageInstalled(pkgName: String): Boolean {
// format day bits to strings like "Mon, Tue, Wed"
fun Context.getSelectedDaysString(bitMask: Int): String {
    val dayBits = arrayListOf(MONDAY_BIT, TUESDAY_BIT, WEDNESDAY_BIT, THURSDAY_BIT, FRIDAY_BIT, SATURDAY_BIT, SUNDAY_BIT)
    val weekDays = resources.getStringArray(R.array.week_days).toList() as ArrayList<String>
    val weekDays = resources.getStringArray(R.array.week_days_short).toList() as ArrayList<String>

    if (baseConfig.isSundayFirst) {
        dayBits.moveLastItemToFront()
@@ -374,7 +374,7 @@ fun Context.getSelectedDaysString(bitMask: Int): String {
    var days = ""
    dayBits.forEachIndexed { index, bit ->
        if (bitMask and bit != 0) {
            days += "${weekDays[index].substringTo(3)}, "
            days += "${weekDays[index]}, "
        }
    }
    return days.trim().trimEnd(',')