-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MM-57964] General UX improvements #779
Changes from 1 commit
fc96415
0d9bd4c
8637b66
fe5efd5
e0f5d78
23315dc
ade3c00
27505e2
7561de9
2090548
9c49a92
010478e
511a51e
84ba0b4
7481aae
7978730
58dcdff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -660,3 +660,12 @@ export const hostMuteOthers = async (callID?: string) => { | |
export const getCallsStats = async () => { | ||
return RestClient.fetch<CallsStats>(`${getPluginPath()}/stats`, {method: 'get'}); | ||
}; | ||
|
||
export const selectRHSPost = (postID: string): ActionFuncAsync => { | ||
return async (dispatch: DispatchFunc) => { | ||
if (window.ProductApi) { | ||
dispatch(window.ProductApi.selectRhsPost(postID)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this guaranteed to be on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose nothing is guaranteed when it comes to webapp :p But it's been there forever if that's what you are asking. |
||
} | ||
return {}; | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import {getConfig, getServerVersion} from 'mattermost-redux/selectors/entities/g | |
import {getCurrentUserLocale} from 'mattermost-redux/selectors/entities/i18n'; | ||
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; | ||
import {getCurrentUserId, isCurrentUserSystemAdmin} from 'mattermost-redux/selectors/entities/users'; | ||
import {ActionFuncAsync} from 'mattermost-redux/types/actions'; | ||
import React, {useEffect} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import {injectIntl, IntlProvider} from 'react-intl'; | ||
|
@@ -24,6 +25,7 @@ import { | |
getCallsStats, | ||
incomingCallOnChannel, | ||
loadProfilesByIdsIfMissing, | ||
selectRHSPost, | ||
setClientConnecting, | ||
showScreenSourceModal, | ||
showSwitchCallModal, | ||
|
@@ -469,6 +471,14 @@ export default class Plugin { | |
})); | ||
} | ||
|
||
if (window.desktopAPI?.onOpenThread) { | ||
logDebug('registering desktopAPI.onOpenThread'); | ||
this.unsubscribers.push(window.desktopAPI.onOpenThread((threadID: string) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
logDebug('desktopAPI.onOpenThread'); | ||
store.dispatch(selectRHSPost(threadID)); | ||
})); | ||
} | ||
|
||
const connectCall = async (channelID: string, title?: string, rootId?: string) => { | ||
// Desktop handler | ||
const payload = { | ||
|
@@ -931,6 +941,7 @@ declare global { | |
ProductApi: { | ||
useWebSocketClient: () => WebSocketClient, | ||
WebSocketProvider: React.Context<WebSocketClient>, | ||
selectRhsPost: (postId: string) => ActionFuncAsync, | ||
}; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just temporary to get it to pass.