Merge branch 'develop' into feature/pin_code

This commit is contained in:
ganfra 2020-07-30 17:24:48 +02:00
commit eb0d350097
5 changed files with 77 additions and 13 deletions

View File

@ -1,9 +1,33 @@
Changes in Element 1.0.1 (2020-XX-XX)
Changes in Element 1.0.3 (2020-XX-XX)
===================================================
Features ✨:
-
Improvements 🙌:
-
Bugfix 🐛:
-
SDK API changes ⚠️:
-
Build 🧱:
-
Other changes:
-
Changes in Element 1.0.2 (2020-07-29)
===================================================
Improvements 🙌:
- Added Session Database migration to avoid unneeded initial syncs
Changes in Element 1.0.1 (2020-07-28)
===================================================
Improvements 🙌:
- Sending events is now retried only 3 times, so we avoid blocking the sending queue too long.
- Display warning when fail to send events in room list
@ -24,15 +48,6 @@ Bugfix 🐛:
- Fix Allow VOIP call in all rooms with 2 participants (even if not DM)
- Migration from old client does not enable notifications (#1723)
Translations 🗣:
-
SDK API changes ⚠️:
-
Build 🧱:
-
Other changes:
- i18n deactivated account error

View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.internal.database
import im.vector.matrix.android.internal.database.model.RoomSummaryEntityFields
import io.realm.DynamicRealm
import io.realm.RealmMigration
import timber.log.Timber
import javax.inject.Inject
class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) {
Timber.v("Migrating Realm Session from $oldVersion to $newVersion")
if (oldVersion <= 0) migrateTo1(realm)
}
private fun migrateTo1(realm: DynamicRealm) {
Timber.d("Step 0 -> 1")
// Add hasFailedSending in RoomSummary and a small warning icon on room list
realm.schema.get("RoomSummaryEntity")
?.addField(RoomSummaryEntityFields.HAS_FAILED_SENDING, Boolean::class.java)
?.transform { obj ->
obj.setBoolean(RoomSummaryEntityFields.HAS_FAILED_SENDING, false)
}
}
}

View File

@ -42,8 +42,13 @@ internal class SessionRealmConfigurationFactory @Inject constructor(
@SessionFilesDirectory val directory: File,
@SessionId val sessionId: String,
@UserMd5 val userMd5: String,
val migration: RealmSessionStoreMigration,
context: Context) {
companion object {
const val SESSION_STORE_SCHEMA_VERSION = 1L
}
private val sharedPreferences = context.getSharedPreferences("im.vector.matrix.android.realm", Context.MODE_PRIVATE)
fun create(): RealmConfiguration {
@ -67,7 +72,8 @@ internal class SessionRealmConfigurationFactory @Inject constructor(
realmKeysUtils.configureEncryption(this, SessionModule.getKeyAlias(userMd5))
}
.modules(SessionRealmModule())
.deleteRealmIfMigrationNeeded()
.schemaVersion(SESSION_STORE_SCHEMA_VERSION)
.migration(migration)
.build()
// Try creating a realm instance and if it succeeds we can clear the flag

View File

@ -17,7 +17,7 @@ androidExtensions {
// Note: 2 digits max for each value
ext.versionMajor = 1
ext.versionMinor = 0
ext.versionPatch = 1
ext.versionPatch = 3
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'

View File

@ -994,7 +994,7 @@
<!-- Room settings: banned users -->
<string name="room_settings_banned_users_title">Banned users</string>
<plurals name="room_settings_banned_users_count">
<item quantity="one">1 banned user</item>
<item quantity="one">%d banned user</item>
<item quantity="other">%d banned users</item>
</plurals>