Add options menu entries for participant list and room details
This commit is contained in:
parent
7c959176fd
commit
7ae5ae2922
@ -165,6 +165,8 @@
|
|||||||
|
|
||||||
<activity android:name=".features.roomprofile.RoomProfileActivity" />
|
<activity android:name=".features.roomprofile.RoomProfileActivity" />
|
||||||
|
|
||||||
|
<activity android:name=".features.roomprofile.members.RoomMemberListActivity" />
|
||||||
|
|
||||||
<activity android:name=".features.signout.hard.SignedOutActivity" />
|
<activity android:name=".features.signout.hard.SignedOutActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".features.signout.soft.SoftLogoutActivity"
|
android:name=".features.signout.soft.SoftLogoutActivity"
|
||||||
|
@ -170,6 +170,7 @@ import im.vector.riotx.features.notifications.NotificationUtils
|
|||||||
import im.vector.riotx.features.permalink.NavigationInterceptor
|
import im.vector.riotx.features.permalink.NavigationInterceptor
|
||||||
import im.vector.riotx.features.permalink.PermalinkHandler
|
import im.vector.riotx.features.permalink.PermalinkHandler
|
||||||
import im.vector.riotx.features.reactions.EmojiReactionPickerActivity
|
import im.vector.riotx.features.reactions.EmojiReactionPickerActivity
|
||||||
|
import im.vector.riotx.features.roomprofile.members.RoomMemberListActivity
|
||||||
import im.vector.riotx.features.settings.VectorPreferences
|
import im.vector.riotx.features.settings.VectorPreferences
|
||||||
import im.vector.riotx.features.settings.VectorSettingsActivity
|
import im.vector.riotx.features.settings.VectorSettingsActivity
|
||||||
import im.vector.riotx.features.share.SharedData
|
import im.vector.riotx.features.share.SharedData
|
||||||
@ -575,6 +576,14 @@ class RoomDetailFragment @Inject constructor(
|
|||||||
roomDetailViewModel.handle(RoomDetailAction.EndCall)
|
roomDetailViewModel.handle(RoomDetailAction.EndCall)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.show_participants -> {
|
||||||
|
startActivity(RoomMemberListActivity.newIntent(requireContext(), roomDetailArgs.roomId))
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.show_room_info -> {
|
||||||
|
navigator.openRoomProfile(requireActivity(), roomDetailArgs.roomId)
|
||||||
|
true
|
||||||
|
}
|
||||||
else -> super.onOptionsItemSelected(item)
|
else -> super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -421,6 +421,8 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||||||
R.id.voice_call,
|
R.id.voice_call,
|
||||||
R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
|
R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
|
||||||
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
|
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
|
||||||
|
R.id.show_room_info -> true
|
||||||
|
R.id.show_participants -> true
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ import im.vector.riotx.features.roomprofile.settings.RoomSettingsFragment
|
|||||||
import im.vector.riotx.features.roomprofile.uploads.RoomUploadsFragment
|
import im.vector.riotx.features.roomprofile.uploads.RoomUploadsFragment
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class RoomProfileActivity :
|
open class RoomProfileActivity :
|
||||||
VectorBaseActivity(),
|
VectorBaseActivity(),
|
||||||
ToolbarConfigurable,
|
ToolbarConfigurable,
|
||||||
RequireActiveMembershipViewModel.Factory {
|
RequireActiveMembershipViewModel.Factory {
|
||||||
@ -53,7 +53,7 @@ class RoomProfileActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var sharedActionViewModel: RoomProfileSharedActionViewModel
|
private lateinit var sharedActionViewModel: RoomProfileSharedActionViewModel
|
||||||
private lateinit var roomProfileArgs: RoomProfileArgs
|
protected lateinit var roomProfileArgs: RoomProfileArgs
|
||||||
|
|
||||||
private val requireActiveMembershipViewModel: RequireActiveMembershipViewModel by viewModel()
|
private val requireActiveMembershipViewModel: RequireActiveMembershipViewModel by viewModel()
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class RoomProfileActivity :
|
|||||||
sharedActionViewModel = viewModelProvider.get(RoomProfileSharedActionViewModel::class.java)
|
sharedActionViewModel = viewModelProvider.get(RoomProfileSharedActionViewModel::class.java)
|
||||||
roomProfileArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
|
roomProfileArgs = intent?.extras?.getParcelable(MvRx.KEY_ARG) ?: return
|
||||||
if (isFirstCreation()) {
|
if (isFirstCreation()) {
|
||||||
addFragment(R.id.simpleFragmentContainer, RoomProfileFragment::class.java, roomProfileArgs)
|
addInitialFragment()
|
||||||
}
|
}
|
||||||
sharedActionViewModel
|
sharedActionViewModel
|
||||||
.observe()
|
.observe()
|
||||||
@ -95,6 +95,10 @@ class RoomProfileActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open fun addInitialFragment() {
|
||||||
|
addFragment(R.id.simpleFragmentContainer, RoomProfileFragment::class.java, roomProfileArgs)
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleRoomLeft(roomLeft: RequireActiveMembershipViewEvents.RoomLeft) {
|
private fun handleRoomLeft(roomLeft: RequireActiveMembershipViewEvents.RoomLeft) {
|
||||||
if (roomLeft.leftMessage != null) {
|
if (roomLeft.leftMessage != null) {
|
||||||
Toast.makeText(this, roomLeft.leftMessage, Toast.LENGTH_LONG).show()
|
Toast.makeText(this, roomLeft.leftMessage, Toast.LENGTH_LONG).show()
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package im.vector.riotx.features.roomprofile.members
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import com.airbnb.mvrx.MvRx
|
||||||
|
import im.vector.riotx.R
|
||||||
|
import im.vector.riotx.core.extensions.addFragment
|
||||||
|
import im.vector.riotx.features.roomprofile.RoomProfileActivity
|
||||||
|
import im.vector.riotx.features.roomprofile.RoomProfileArgs
|
||||||
|
|
||||||
|
class RoomMemberListActivity :
|
||||||
|
RoomProfileActivity() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
fun newIntent(context: Context, roomId: String): Intent {
|
||||||
|
val roomProfileArgs = RoomProfileArgs(roomId)
|
||||||
|
return Intent(context, RoomMemberListActivity::class.java).apply {
|
||||||
|
putExtra(MvRx.KEY_ARG, roomProfileArgs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun addInitialFragment() {
|
||||||
|
addFragment(R.id.simpleFragmentContainer, RoomMemberListFragment::class.java, roomProfileArgs)
|
||||||
|
}
|
||||||
|
}
|
@ -58,4 +58,18 @@
|
|||||||
app:showAsAction="never"
|
app:showAsAction="never"
|
||||||
tools:visible="true" />
|
tools:visible="true" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/show_participants"
|
||||||
|
android:title="@string/show_participants_sc"
|
||||||
|
android:visible="true"
|
||||||
|
app:showAsAction="never"
|
||||||
|
tools:visible="true" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/show_room_info"
|
||||||
|
android:title="@string/show_room_info_sc"
|
||||||
|
android:visible="true"
|
||||||
|
app:showAsAction="never"
|
||||||
|
tools:visible="true" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -2107,7 +2107,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine
|
|||||||
<string name="room_profile_section_security">Sicherheit</string>
|
<string name="room_profile_section_security">Sicherheit</string>
|
||||||
<string name="room_profile_section_security_learn_more">Mehr erfahren</string>
|
<string name="room_profile_section_security_learn_more">Mehr erfahren</string>
|
||||||
<string name="room_profile_section_more">Mehr</string>
|
<string name="room_profile_section_more">Mehr</string>
|
||||||
<string name="room_profile_section_more_settings">Raum Einstellungen</string>
|
<string name="room_profile_section_more_settings">Raum-Einstellungen</string>
|
||||||
<string name="room_profile_section_more_notifications">Benachrichtigungen</string>
|
<string name="room_profile_section_more_notifications">Benachrichtigungen</string>
|
||||||
<plurals name="room_profile_section_more_member_list">
|
<plurals name="room_profile_section_more_member_list">
|
||||||
<item quantity="one">Eine Person</item>
|
<item quantity="one">Eine Person</item>
|
||||||
|
@ -26,4 +26,7 @@
|
|||||||
<string name="login_server_other_title_sc">Benutzerdefinierter Server</string>
|
<string name="login_server_other_title_sc">Benutzerdefinierter Server</string>
|
||||||
<string name="login_server_other_text_sc">Serveradresse angeben zum Anmelden oder Registrieren</string>
|
<string name="login_server_other_text_sc">Serveradresse angeben zum Anmelden oder Registrieren</string>
|
||||||
|
|
||||||
|
<string name="show_room_info_sc">Rauminfo</string>
|
||||||
|
<string name="show_participants_sc">Teilnehmer</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -26,4 +26,7 @@
|
|||||||
<string name="login_server_other_title_sc">Custom server</string>
|
<string name="login_server_other_title_sc">Custom server</string>
|
||||||
<string name="login_server_other_text_sc">Enter server address to login or register</string>
|
<string name="login_server_other_text_sc">Enter server address to login or register</string>
|
||||||
|
|
||||||
|
<string name="show_room_info_sc">Room details</string>
|
||||||
|
<string name="show_participants_sc">Participants</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user