-
Notifications
You must be signed in to change notification settings - Fork 782
Replace flattenParents with directParentName #6314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ericdecanini
merged 32 commits into
develop
from
task/eric/replace_flatten_with_direct_parent
Jul 20, 2022
Merged
Changes from 12 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
385720b
Replaces flatten parents with direct parent name in RoomSummary
ericdecanini d5c5c57
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini d40c2f8
Fixes migration error
ericdecanini 7f3325e
Fixes wrong user id in search room summary item
ericdecanini b5fc0b5
Adds changelog file
ericdecanini 9766b62
Fixes lint error
ericdecanini 9350053
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini cb400b6
Fixes post merge error
ericdecanini ed3a201
Changes directParentName to a list
ericdecanini b437996
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini e003bc9
Adds clearing to directParentNames
ericdecanini 98d195c
Changes migration to be realm list field
ericdecanini c6728dd
Changes string format of space parents to maintain parity with web
ericdecanini 051f925
Adds MigrateSessionTo032Test
ericdecanini 13b9b5b
Changes string into plural
ericdecanini 1ae5965
Fixes import order
ericdecanini 67dd250
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini c73c36e
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini 7d29fbc
Fixes post merge errors
ericdecanini 7bb7a08
Fixes copyright lint error
ericdecanini e6475a3
Fixes copyright lint error
ericdecanini bc5c53b
Fixes copyright lint error
ericdecanini e926871
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini 6f9b5c0
Deletes migration test
ericdecanini f9580e6
Fixes error in RealmSessionStoreMigration
ericdecanini ee941cf
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini 5f6f16d
Adds migrate session to 034
ericdecanini 10b1443
add quick test for direct parent name
BillCarsonFr 0ad2051
Improves plural used in strings
ericdecanini 9e1235d
Merge remote-tracking branch 'origin/develop' into task/eric/replace_…
ericdecanini b89df0b
Adds MigrateSessionTo035
ericdecanini 3f637ea
Fixes migration crash
ericdecanini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improves performance on search screen by replacing flattenParents with directParentName in RoomSummary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...d/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo032.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2022 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 org.matrix.android.sdk.internal.database.migration | ||
|
||
import io.realm.DynamicRealm | ||
import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields | ||
import org.matrix.android.sdk.internal.util.database.RealmMigrator | ||
|
||
internal class MigrateSessionTo032(realm: DynamicRealm) : RealmMigrator(realm, 32) { | ||
|
||
override fun doMigrate(realm: DynamicRealm) { | ||
realm.schema.get("RoomSummaryEntity") | ||
?.addRealmListField(RoomSummaryEntityFields.DIRECT_PARENT_NAMES.`$`, String::class.java) | ||
?.transform { it.setString(RoomSummaryEntityFields.DIRECT_PARENT_NAMES.`$`, "") } | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parity with web https://github.com/matrix-org/matrix-react-sdk/blob/d4a4eeaf63e27ce8146dfc6ef783c819968cca4c/src/utils/i18n-helpers.ts#L23