···220220 "scroll RecyclerView to bottom"
221221222222 override fun getConstraints(): Matcher<View> =
223223- allOf<View>(isAssignableFrom(RecyclerView::class.java), isDisplayed())
223223+ allOf(isAssignableFrom(RecyclerView::class.java), isDisplayed())
224224225225 override fun perform(uiController: UiController?, view: View?) {
226226 val recyclerView = view as RecyclerView
+1-1
app/src/debug/res/values/strings.xml
···11<resources>
22- <string name="app_name">Debug Simple Time Tracker</string>
22+ <string name="app_name" translatable="false">Debug Simple Time Tracker</string>
33</resources>
-41
app/src/main/res/anim/fragment_close_exit.xml
···11-<?xml version="1.0" encoding="utf-8"?>
22-<!--
33- Copyright 2019 The Android Open Source Project
44-55- Licensed under the Apache License, Version 2.0 (the "License");
66- you may not use this file except in compliance with the License.
77- You may obtain a copy of the License at
88-99- http://www.apache.org/licenses/LICENSE-2.0
1010-1111- Unless required by applicable law or agreed to in writing, software
1212- distributed under the License is distributed on an "AS IS" BASIS,
1313- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414- See the License for the specific language governing permissions and
1515- limitations under the License.
1616- -->
1717-<set xmlns:android="http://schemas.android.com/apk/res/android"
1818- android:shareInterpolator="false"
1919- android:zAdjustment="top">
2020- <alpha
2121- android:fromAlpha="1"
2222- android:toAlpha="0.0"
2323- android:fillEnabled="true"
2424- android:fillBefore="true"
2525- android:fillAfter="true"
2626- android:interpolator="@android:anim/linear_interpolator"
2727- android:startOffset="66"
2828- android:duration="50"/>
2929- <scale
3030- android:fromXScale="1"
3131- android:toXScale="0.9"
3232- android:fromYScale="1"
3333- android:toYScale="0.9"
3434- android:pivotX="50%"
3535- android:pivotY="50%"
3636- android:fillEnabled="true"
3737- android:fillBefore="true"
3838- android:fillAfter="true"
3939- android:interpolator="@anim/fragment_fast_out_extra_slow_in"
4040- android:duration="300"/>
4141-</set>
-42
app/src/main/res/anim/fragment_open_enter.xml
···11-<?xml version="1.0" encoding="utf-8"?>
22-<!--
33- Copyright 2019 The Android Open Source Project
44-55- Licensed under the Apache License, Version 2.0 (the "License");
66- you may not use this file except in compliance with the License.
77- You may obtain a copy of the License at
88-99- http://www.apache.org/licenses/LICENSE-2.0
1010-1111- Unless required by applicable law or agreed to in writing, software
1212- distributed under the License is distributed on an "AS IS" BASIS,
1313- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414- See the License for the specific language governing permissions and
1515- limitations under the License.
1616- -->
1717-<set xmlns:android="http://schemas.android.com/apk/res/android"
1818- xmlns:tools="http://schemas.android.com/tools"
1919- android:shareInterpolator="false">
2020- <alpha
2121- android:fromAlpha="0"
2222- android:toAlpha="1.0"
2323- android:fillEnabled="true"
2424- android:fillBefore="true"
2525- android:fillAfter="true"
2626- android:interpolator="@android:anim/linear_interpolator"
2727- android:startOffset="35"
2828- android:duration="50"/>
2929- <scale
3030- android:fromXScale="0.85"
3131- android:toXScale="1"
3232- android:fromYScale="0.85"
3333- android:toYScale="1"
3434- android:pivotX="50%"
3535- android:pivotY="50%"
3636- android:fillEnabled="true"
3737- android:fillBefore="true"
3838- android:fillAfter="true"
3939- android:interpolator="@anim/fragment_fast_out_extra_slow_in"
4040- android:duration="300"
4141- tools:targetApi="lollipop" />
4242-</set>
+1-1
app/src/main/res/values/strings.xml
···11<resources>
22- <string name="app_name">Simple Time Tracker</string>
22+ <string name="app_name" translatable="false">Simple Time Tracker</string>
33</resources>
···116116 private suspend fun sortByManualOrder(records: List<RecordType>): List<RecordType> {
117117 val order = prefsInteractor.getCardOrderManual()
118118 return records
119119- .map { type -> type to order.getOrElse(type.id, { 0 }) }
119119+ .map { type -> type to order.getOrElse(type.id) { 0 } }
120120 .sortedBy { (_, order) -> order }
121121 .map { (type, _) -> type }
122122 }
···99class StatisticsMapper @Inject constructor() {
10101111 fun mapToDuration(records: List<Record>): Long {
1212- return records
1313- .map { it.timeEnded - it.timeStarted }
1414- .sum()
1212+ return records.sumOf { it.timeEnded - it.timeStarted }
1513 }
16141715 fun mapToDurationFromRange(records: List<Record>, start: Long, end: Long): Long {
1818- return records
1919- // Remove parts of the record that is not in the range
2020- .map { min(it.timeEnded, end) - max(it.timeStarted, start) }
2121- .sum()
1616+ // Remove parts of the record that is not in the range
1717+ return records.sumOf { min(it.timeEnded, end) - max(it.timeStarted, start) }
2218 }
23192420 fun getDurationPercentString(
···3939 val isDarkTheme = prefsInteractor.getDarkMode()
4040 val useMilitaryTime = prefsInteractor.getUseMilitaryTimeFormat()
4141 val useProportionalMinutes = prefsInteractor.getUseProportionalMinutes()
4242- val recordTypes = recordTypeInteractor.getAll().map { it.id to it }.toMap()
4242+ val recordTypes = recordTypeInteractor.getAll().associateBy { it.id }
4343 val recordTags = recordTagInteractor.getAll()
4444 val typesSelected = typesFilterInteractor.getTypeIds(filter)
4545 val records = if (commentSearch.isEmpty()) {