mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 04:52:00 +03:00
Room detail: Fix roomId not set up when activity is restored
This commit is contained in:
parent
f745e22a52
commit
c1c8c04567
1 changed files with 8 additions and 9 deletions
|
@ -77,16 +77,15 @@ class RoomDetailActivity :
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
waitingView = waiting_view
|
||||
val roomDetailArgs: RoomDetailArgs? = if (intent?.action == ACTION_ROOM_DETAILS_FROM_SHORTCUT) {
|
||||
RoomDetailArgs(roomId = intent?.extras?.getString(EXTRA_ROOM_ID)!!)
|
||||
} else {
|
||||
intent?.extras?.getParcelable(EXTRA_ROOM_DETAIL_ARGS)
|
||||
}
|
||||
if (roomDetailArgs == null) return
|
||||
currentRoomId = roomDetailArgs.roomId
|
||||
|
||||
if (isFirstCreation()) {
|
||||
val roomDetailArgs: RoomDetailArgs? = if (intent?.action == ACTION_ROOM_DETAILS_FROM_SHORTCUT) {
|
||||
RoomDetailArgs(roomId = intent?.extras?.getString(EXTRA_ROOM_ID)!!)
|
||||
} else {
|
||||
intent?.extras?.getParcelable(EXTRA_ROOM_DETAIL_ARGS)
|
||||
}
|
||||
|
||||
if (roomDetailArgs == null) return
|
||||
|
||||
currentRoomId = roomDetailArgs.roomId
|
||||
replaceFragment(R.id.roomDetailContainer, RoomDetailFragment::class.java, roomDetailArgs)
|
||||
replaceFragment(R.id.roomDetailDrawerContainer, BreadcrumbsFragment::class.java)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue