Threads experimental transition modal (#8065)

This commit is contained in:
Germain 2022-03-16 16:35:25 +00:00 committed by GitHub
parent bb6ae3fdbc
commit 59584cdc3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

View file

@ -131,6 +131,7 @@ import { ViewHomePagePayload } from '../../dispatcher/payloads/ViewHomePagePaylo
import { AfterLeaveRoomPayload } from '../../dispatcher/payloads/AfterLeaveRoomPayload';
import { DoAfterSyncPreparedPayload } from '../../dispatcher/payloads/DoAfterSyncPreparedPayload';
import { ViewStartChatOrReusePayload } from '../../dispatcher/payloads/ViewStartChatOrReusePayload';
import InfoDialog from '../views/dialogs/InfoDialog';
// legacy export
export { default as Views } from "../../Views";
@ -1460,6 +1461,36 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
showNotificationsToast(false);
}
if (!localStorage.getItem("mx_seen_feature_thread_experimental")) {
setTimeout(() => {
if (SettingsStore.getValue("feature_thread") && SdkConfig.get()['showLabsSettings']) {
Modal.createDialog(InfoDialog, {
title: _t("Threads are no longer experimental! 🎉"),
description: <>
<p>
{ _t("Weve recently introduced key stability "
+ "improvements for Threads, which also means "
+ "phasing out support for experimental Threads.") }
</p>
<p>
{ _t("All thread events created during the "
+ "experimental period will now be rendered in "
+ "the room timeline and displayed as replies. "
+ "This is a one-off transition. Threads are now "
+ "part of the Matrix specification.") }
</p>
<p>
{ _t("Thank you for helping us testing Threads!") }
</p>
</>,
onFinished: () => {
localStorage.setItem("mx_seen_feature_thread_experimental", "true");
},
});
}
}, 1 * 60 * 1000); // show after 1 minute to not overload user on launch
}
if (!localStorage.getItem("mx_seen_feature_spotlight_toast")) {
setTimeout(() => {
// Skip the toast if the beta is already enabled or the user has changed the setting from default