Open drawer when clicking on group avatar
This commit is contained in:
parent
aec7e72dcf
commit
ed18a504e4
|
@ -113,10 +113,6 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
|
|||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
drawerLayout.openDrawer(GravityCompat.START)
|
||||
return true
|
||||
}
|
||||
R.id.sliding_menu_sign_out -> {
|
||||
SignOutUiWorker(this).perform(Matrix.getInstance().currentSession!!)
|
||||
return true
|
||||
|
@ -126,6 +122,11 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
|
|||
return true
|
||||
}
|
||||
|
||||
// Called by HomeDetailFragment
|
||||
fun openDrawer() {
|
||||
drawerLayout.openDrawer(GravityCompat.START)
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
drawerLayout.closeDrawer(GravityCompat.START)
|
||||
|
|
|
@ -89,7 +89,7 @@ class HomeDetailFragment : VectorBaseFragment() {
|
|||
groupToolbarAvatarImageView
|
||||
)
|
||||
groupToolbarAvatarImageView.setOnClickListener {
|
||||
vectorBaseActivity.notImplemented("Group click in toolbar")
|
||||
(vectorBaseActivity as? HomeActivity)?.openDrawer()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue