forked from GitHub-Mirror/riotX-android
Merge pull request #385 from vector-im/feature/invit_notif
Cancel invitation notification when handling the invitation in the application
This commit is contained in:
commit
a98b324c89
@ -858,10 +858,12 @@ class RoomDetailFragment :
|
|||||||
// VectorInviteView.Callback
|
// VectorInviteView.Callback
|
||||||
|
|
||||||
override fun onAcceptInvite() {
|
override fun onAcceptInvite() {
|
||||||
|
notificationDrawerManager.clearMemberShipNotificationForRoom(roomDetailArgs.roomId)
|
||||||
roomDetailViewModel.process(RoomDetailActions.AcceptInvite)
|
roomDetailViewModel.process(RoomDetailActions.AcceptInvite)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onRejectInvite() {
|
override fun onRejectInvite() {
|
||||||
|
notificationDrawerManager.clearMemberShipNotificationForRoom(roomDetailArgs.roomId)
|
||||||
roomDetailViewModel.process(RoomDetailActions.RejectInvite)
|
roomDetailViewModel.process(RoomDetailActions.RejectInvite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ import im.vector.riotx.core.platform.OnBackPressed
|
|||||||
import im.vector.riotx.core.platform.StateView
|
import im.vector.riotx.core.platform.StateView
|
||||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||||
import im.vector.riotx.features.home.room.list.widget.FabMenuView
|
import im.vector.riotx.features.home.room.list.widget.FabMenuView
|
||||||
|
import im.vector.riotx.features.notifications.NotificationDrawerManager
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import kotlinx.android.synthetic.main.fragment_room_list.*
|
import kotlinx.android.synthetic.main.fragment_room_list.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -69,6 +70,7 @@ class RoomListFragment : VectorBaseFragment(), RoomSummaryController.Listener, O
|
|||||||
@Inject lateinit var roomController: RoomSummaryController
|
@Inject lateinit var roomController: RoomSummaryController
|
||||||
@Inject lateinit var roomListViewModelFactory: RoomListViewModel.Factory
|
@Inject lateinit var roomListViewModelFactory: RoomListViewModel.Factory
|
||||||
@Inject lateinit var errorFormatter: ErrorFormatter
|
@Inject lateinit var errorFormatter: ErrorFormatter
|
||||||
|
@Inject lateinit var notificationDrawerManager: NotificationDrawerManager
|
||||||
private val roomListViewModel: RoomListViewModel by fragmentViewModel()
|
private val roomListViewModel: RoomListViewModel by fragmentViewModel()
|
||||||
|
|
||||||
override fun getLayoutResId() = R.layout.fragment_room_list
|
override fun getLayoutResId() = R.layout.fragment_room_list
|
||||||
@ -258,10 +260,12 @@ class RoomListFragment : VectorBaseFragment(), RoomSummaryController.Listener, O
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onAcceptRoomInvitation(room: RoomSummary) {
|
override fun onAcceptRoomInvitation(room: RoomSummary) {
|
||||||
|
notificationDrawerManager.clearMemberShipNotificationForRoom(room.roomId)
|
||||||
roomListViewModel.accept(RoomListActions.AcceptInvitation(room))
|
roomListViewModel.accept(RoomListActions.AcceptInvitation(room))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onRejectRoomInvitation(room: RoomSummary) {
|
override fun onRejectRoomInvitation(room: RoomSummary) {
|
||||||
|
notificationDrawerManager.clearMemberShipNotificationForRoom(room.roomId)
|
||||||
roomListViewModel.accept(RoomListActions.RejectInvitation(room))
|
roomListViewModel.accept(RoomListActions.RejectInvitation(room))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user