Code quality

This commit is contained in:
Valere 2021-07-15 14:46:41 +02:00
parent a626f42a3b
commit 5adceaca23
4 changed files with 11 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View file

@ -162,7 +162,7 @@ Formatter\.formatShortFileSize===1
# android\.text\.TextUtils
### This is not a rule, but a warning: the number of "enum class" has changed. For Json classes, it is mandatory that they have `@JsonClass(generateAdapter = false)`. If the enum is not used as a Json class, change the value in file forbidden_strings_in_code.txt
enum class===103
enum class===104
### Do not import temporary legacy classes
import org.matrix.android.sdk.internal.legacy.riot===3

View file

@ -354,11 +354,13 @@ class RoomJoinRuleChooseRestrictedViewModel @AssistedInject constructor(
viewModelScope.launch {
if (vectorPreferences.developerMode()) {
// in developer mode we let you choose any room or space to restrict to
val filteredCandidates = session.getRoomSummaries(roomSummaryQueryParams {
excludeType = null
displayName = QueryStringValue.Contains(action.filter, QueryStringValue.Case.INSENSITIVE)
memberships = listOf(Membership.JOIN)
}).map { it.toMatrixItem() }
val filteredCandidates = session.getRoomSummaries(
roomSummaryQueryParams {
excludeType = null
displayName = QueryStringValue.Contains(action.filter, QueryStringValue.Case.INSENSITIVE)
memberships = listOf(Membership.JOIN)
}
).map { it.toMatrixItem() }
setState {
copy(
filteredResults = Success(filteredCandidates)

View file

@ -22,7 +22,7 @@
app:titleEnabled="false"
app:toolbarId="@+id/toolbar">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -47,7 +47,7 @@
android:textColor="?vctr_content_secondary" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.MaterialToolbar>
<!-- <com.google.android.material.appbar.MaterialToolbar-->