mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +02:00
Allow saving rules without days
This commit is contained in:
parent
21fa778a32
commit
12b83a66f5
4 changed files with 9 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 - 2020 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019 - 2022 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -39,6 +39,7 @@ object DayNameUtil {
|
|||
}
|
||||
}
|
||||
|
||||
return JoinUtil.join(dayGroups, context)
|
||||
return if (dayGroups.isEmpty()) context.getString(R.string.util_day_no_day)
|
||||
else JoinUtil.join(dayGroups, context)
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
TimeLimit Copyright <C> 2019 - 2020 Jonas Lochmann
|
||||
TimeLimit Copyright <C> 2019 - 2022 Jonas Lochmann
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation version 3 of the License.
|
||||
|
@ -248,8 +248,11 @@
|
|||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:visibility="@{applyToZeroDays ? View.VISIBLE : View.GONE}"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="@color/orange_text"
|
||||
android:text="@string/category_time_limit_rules_warning_zero_day_part"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
@ -275,7 +278,6 @@
|
|||
android:layout_height="wrap_content" />
|
||||
|
||||
<Button
|
||||
android:enabled="@{!applyToZeroDays}"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:onClick="@{() -> handlers.onSaveRule()}"
|
||||
|
|
|
@ -1622,6 +1622,7 @@
|
|||
<string name="util_time_used"><xliff:g example="4 minutes" id="used time">%1$s</xliff:g> benutzt</string>
|
||||
|
||||
<string name="util_day_from_to">%s bis %s</string>
|
||||
<string name="util_day_no_day">an keinen Tagen</string>
|
||||
|
||||
<string name="widget_msg_unconfigured">Dieses Widget funktioniert nur auf beschränkten Geräten</string>
|
||||
<string name="widget_msg_no_child">Momentan hat dieses Gerät keinen Kind-Benutzer</string>
|
||||
|
|
|
@ -1669,6 +1669,7 @@
|
|||
<string name="util_time_used">Used <xliff:g example="4 minutes" id="used time">%1$s</xliff:g></string>
|
||||
|
||||
<string name="util_day_from_to">%s to %s</string>
|
||||
<string name="util_day_no_day">at no days</string>
|
||||
|
||||
<string name="widget_msg_unconfigured">This Widget only works on limited devices</string>
|
||||
<string name="widget_msg_no_child">This device is not used by a child right now</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue