Merge pull request #1693 from vector-im/feature/fix_1613

Feature/fix 1613
This commit is contained in:
Benoit Marty 2020-07-15 16:41:19 +02:00 committed by GitHub
commit da4e3f3b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 4 deletions

View File

@ -8,7 +8,7 @@ Improvements 🙌:
-
Bugfix 🐛:
-
- Fix theme issue on Room directory screen (#1613)
Translations 🗣:
-

View File

@ -116,11 +116,11 @@ internal class SyncResponseHandler @Inject constructor(@SessionDatabase private
tokenStore.saveToken(realm, syncResponse.nextBatch)
}
// Everything else we need to do outside the transaction
syncResponse.rooms?.also {
syncResponse.rooms?.let {
checkPushRules(it, isInitialSync)
userAccountDataSyncHandler.synchronizeWithServerIfNeeded(it.invite)
}
syncResponse.groups?.also {
syncResponse.groups?.let {
scheduleGroupDataFetchingIfNeeded(it)
}

View File

@ -19,6 +19,7 @@ package im.vector.riotx.features.roomdirectory.picker
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.core.view.isInvisible
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.riotx.R
@ -58,6 +59,7 @@ abstract class RoomDirectoryItem : VectorEpoxyModel<RoomDirectoryItem.Holder>()
}
}
.into(holder.avatarView)
holder.avatarView.isInvisible = directoryAvatarUrl.isNullOrBlank() && includeAllNetworks
holder.nameView.text = directoryName
holder.descritionView.setTextOrHide(directoryDescription)

View File

@ -26,6 +26,7 @@ import im.vector.matrix.android.api.session.room.model.thirdparty.RoomDirectoryD
import im.vector.riotx.R
import im.vector.riotx.core.extensions.cleanup
import im.vector.riotx.core.extensions.configureWith
import im.vector.riotx.core.platform.VectorBaseActivity
import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.features.roomdirectory.RoomDirectoryAction
import im.vector.riotx.features.roomdirectory.RoomDirectorySharedAction
@ -35,7 +36,6 @@ import kotlinx.android.synthetic.main.fragment_room_directory_picker.*
import timber.log.Timber
import javax.inject.Inject
// TODO Set title to R.string.select_room_directory
// TODO Menu to add custom room directory (not done in RiotWeb so far...)
class RoomDirectoryPickerFragment @Inject constructor(val roomDirectoryPickerViewModelFactory: RoomDirectoryPickerViewModel.Factory,
private val roomDirectoryPickerController: RoomDirectoryPickerController
@ -91,6 +91,11 @@ class RoomDirectoryPickerFragment @Inject constructor(val roomDirectoryPickerVie
sharedActionViewModel.post(RoomDirectorySharedAction.Back)
}
override fun onResume() {
super.onResume()
(activity as? VectorBaseActivity)?.supportActionBar?.setTitle(R.string.select_room_directory)
}
override fun retry() {
Timber.v("Retry")
pickerViewModel.handle(RoomDirectoryPickerAction.Retry)

View File

@ -19,6 +19,8 @@
android:layout_marginLeft="8dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:background="@drawable/circle"
android:padding="8dp"
app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryBottomSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@ -6,6 +6,8 @@
android:id="@+id/action_add_custom_hs"
android:icon="@drawable/ic_add_black"
android:title="@string/action_open"
android:visible="@bool/false_not_implemented"
app:iconTint="?colorAccent"
app:showAsAction="always" />
</menu>