Skip to content
Snippets Groups Projects
Commit 3b502c15 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #5895 from RocketChat/improvements/close-admin-on-sidebar-close

Go back to last room when close admin view
parents 56cb1b45 75bb30f5
No related branches found
Tags 6.12.0
No related merge requests found
......@@ -78,6 +78,13 @@
focusInput()
closeFlex = (callback = null) ->
if not RocketChat.roomTypes.getTypes().filter((i) -> i.route).map((i) -> i.route.name).includes(FlowRouter.current().route.name)
subscription = RocketChat.models.Subscriptions.findOne({rid: Session.get('openedRoom')})
if subscription?
RocketChat.roomTypes.openRouteLink(subscription.t, subscription, FlowRouter.current().queryParams);
else
FlowRouter.go('home')
return if animating == true
toggleArrow -1
toggleFlex -1, callback
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment