Merge branch 'develop' into api-21-cleanup

This commit is contained in:
Benoit Marty 2020-08-18 10:11:02 +02:00 committed by GitHub
commit 9385bd2a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,10 @@
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1

View File

@ -11,6 +11,7 @@ Improvements 🙌:
- Ensure users do not accidentally ignore other users (#1890) - Ensure users do not accidentally ignore other users (#1890)
Bugfix 🐛: Bugfix 🐛:
- Fix incorrect date format for some Asian languages (#1928)
- Fix invisible toolbar (Status.im theme) (#1746) - Fix invisible toolbar (Status.im theme) (#1746)
- Fix relative date time formatting (#822) - Fix relative date time formatting (#822)
- Fix crash reported by RageShake - Fix crash reported by RageShake
@ -33,6 +34,7 @@ Other changes:
- Rename package `im.vector.riotx.multipicker` to `im.vector.lib.multipicker` - Rename package `im.vector.riotx.multipicker` to `im.vector.lib.multipicker`
- Rename package `im.vector.riotx` to `im.vector.app` - Rename package `im.vector.riotx` to `im.vector.app`
- Remove old code that was used on devices with api level <21 - Remove old code that was used on devices with api level <21
- Add Official Gradle Wrapper Validation Action
Changes in Element 1.0.4 (2020-08-03) Changes in Element 1.0.4 (2020-08-03)
=================================================== ===================================================

View File

@ -17,6 +17,7 @@
package im.vector.app.core.date package im.vector.app.core.date
import android.content.Context import android.content.Context
import android.text.format.DateFormat
import android.text.format.DateUtils import android.text.format.DateUtils
import im.vector.app.core.resources.LocaleProvider import im.vector.app.core.resources.LocaleProvider
import org.threeten.bp.LocalDateTime import org.threeten.bp.LocalDateTime
@ -45,8 +46,9 @@ class VectorDateFormatter @Inject constructor(private val context: Context,
private val messageHourFormatter by lazy { private val messageHourFormatter by lazy {
DateTimeFormatter.ofPattern("H:mm", localeProvider.current()) DateTimeFormatter.ofPattern("H:mm", localeProvider.current())
} }
private val messageDayFormatter by lazy { private val messageDayFormatter by lazy {
DateTimeFormatter.ofPattern("EEE d MMM", localeProvider.current()) DateTimeFormatter.ofPattern(DateFormat.getBestDateTimePattern(localeProvider.current(), "EEE d MMM"))
} }
fun formatMessageHour(localDateTime: LocalDateTime): String { fun formatMessageHour(localDateTime: LocalDateTime): String {