Skip to content

Commit

Permalink
fix(conflict): merge conflict on roomheader and onboardingcontext
Browse files Browse the repository at this point in the history
  • Loading branch information
marc.sirisak committed Sep 10, 2024
1 parent 6cc5a1f commit 7f1435a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 100 deletions.
14 changes: 2 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"name": "matrix-react-sdk",
<<<<<<< HEAD
"version": "0.0.0",
"version-matrix": "3.104.0",
"version-matrix": "3.108.0",
"description": "SDK for matrix.org using React for Tchap",
"author": "DINUM",
=======
"version": "3.108.0",
"description": "SDK for matrix.org using React",
"author": "matrix.org",
>>>>>>> v3.108.0
"repository": {
"type": "git",
"url": "https://github.com/tchapgouv/matrix-react-sdk-tchap"
Expand Down Expand Up @@ -84,12 +78,8 @@
"@babel/runtime": "^7.12.5",
"@matrix-org/analytics-events": "^0.24.0",
"@matrix-org/emojibase-bindings": "^1.1.2",
<<<<<<< HEAD
"@matrix-org/matrix-wysiwyg": "2.37.4",
"@matrix-org/olm": "3.2.15",
=======
"@matrix-org/matrix-wysiwyg": "2.37.8",
>>>>>>> v3.108.0
"@matrix-org/olm": "3.2.15",
"@matrix-org/react-sdk-module-api": "^2.4.0",
"@matrix-org/spec": "^1.7.0",
"@sentry/browser": "^8.0.0",
Expand Down
3 changes: 0 additions & 3 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,8 @@ import { checkSessionLockFree, getSessionLock } from "../../utils/SessionLock";
import { SessionLockStolenView } from "./auth/SessionLockStolenView";
import { ConfirmSessionLockTheftView } from "./auth/ConfirmSessionLockTheftView";
import { LoginSplashView } from "./auth/LoginSplashView";
<<<<<<< HEAD
import TchapUrls from "../../../../../src/tchap/util/TchapUrls"; // :TCHAP: activate-cross-signing-and-secure-storage-react
=======
import { cleanUpDraftsIfRequired } from "../../DraftCleaner";
>>>>>>> v3.108.0

// legacy export
export { default as Views } from "../../Views";
Expand Down
3 changes: 0 additions & 3 deletions src/components/views/dialogs/BugReportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ import DialogButtons from "../elements/DialogButtons";
import { sendSentryReport } from "../../../sentry";
import defaultDispatcher from "../../../dispatcher/dispatcher";
import { Action } from "../../../dispatcher/actions";
<<<<<<< HEAD
import TchapUtils from "../../../../../../src/tchap/util/TchapUtils"; // :TCHAP:
=======
import { getBrowserSupport } from "../../../SupportedBrowser";
>>>>>>> v3.108.0

interface IProps {
onFinished: (success: boolean) => void;
Expand Down
74 changes: 9 additions & 65 deletions src/components/views/rooms/RoomHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@ export default function RoomHeader({
}}
className="mx_RoomHeader_infoWrapper"
>
<<<<<<< HEAD
{/* :TCHAP: customize-room-header-bar - RoomAvatar -> DecoratedRoomAvatar
<RoomAvatar room={room} size="40px" />
{/* :TCHAP: customize-room-header-bar - RoomAvatar -> DecoratedRoomAvatar
<WithPresenceIndicator room={room} size="8px">
<RoomAvatar room={room} size="40px" oobData={oobData} />
</WithPresenceIndicator>
*/}
<DecoratedRoomAvatar room={room} size="40px" />
{/* end :TCHAP: */}
Expand Down Expand Up @@ -300,33 +301,6 @@ export default function RoomHeader({
</Tooltip>
)}
*/}
=======
<WithPresenceIndicator room={room} size="8px">
<RoomAvatar room={room} size="40px" oobData={oobData} />
</WithPresenceIndicator>
<Box flex="1" className="mx_RoomHeader_info">
<BodyText
as="div"
size="lg"
weight="semibold"
dir="auto"
role="heading"
aria-level={1}
className="mx_RoomHeader_heading"
>
<span className="mx_RoomHeader_truncated mx_lineClamp">{roomName}</span>

{!isDirectMessage && joinRule === JoinRule.Public && (
<Tooltip label={_t("common|public_room")} placement="right">
<PublicIcon
width="16px"
height="16px"
className="mx_RoomHeader_icon text-secondary"
aria-label={_t("common|public_room")}
/>
</Tooltip>
)}
>>>>>>> v3.108.0

{/* :tchap: customize-room-header-bar - do not show e2eStatus
{isDirectMessage && e2eStatus === E2EStatus.Verified && (
Expand All @@ -341,7 +315,6 @@ export default function RoomHeader({
)}
*/}

<<<<<<< HEAD
{/* :tchap: customize-room-header-bar - do not show E2EStatus.Warning
{isDirectMessage && e2eStatus === E2EStatus.Warning && (
<Tooltip label={_t("room|header_untrusted_label")} placement="right">
Expand All @@ -355,28 +328,6 @@ export default function RoomHeader({
)}
*/}
</BodyText>
{roomTopic && (
<BodyText
as="div"
size="sm"
className="mx_RoomHeader_topic mx_RoomHeader_truncated mx_lineClamp"
>
<Linkify>{roomTopicBody}</Linkify>
</BodyText>
)}
=======
{isDirectMessage && e2eStatus === E2EStatus.Warning && (
<Tooltip label={_t("room|header_untrusted_label")} placement="right">
<ErrorIcon
width="16px"
height="16px"
className="mx_RoomHeader_icon mx_Untrusted"
aria-label={_t("room|header_untrusted_label")}
/>
</Tooltip>
)}
</BodyText>
>>>>>>> v3.108.0
</Box>
</button>
</ReleaseAnnouncement>
Expand Down Expand Up @@ -405,24 +356,19 @@ export default function RoomHeader({
joinCallButton
) : (
<>
<<<<<<< HEAD
{ /* :TCHAP: customize-room-header-bar - activate video call only if directmessage and if feature is activated on homeserver }
{!isVideoRoom(room) && videoCallButton}
{!isVideoRoom && videoCallButton}
*/ }
{isDirectMessage && TchapUIFeature.isFeatureActiveForHomeserver("feature_video_call") &&
!isVideoRoom(room) && videoCallButton}
!isVideoRoom && videoCallButton}
{/* end :TCHAP: */}

{ /* :TCHAP: customize-room-header-bar - activate audio call only if directmessage and if feature is activated on homeserver
{!useElementCallExclusively && !isVideoRoom(room) && voiceCallButton}
*/ }
{isDirectMessage && TchapUIFeature.isFeatureActiveForHomeserver("feature_audio_call") &&
!useElementCallExclusively && !isVideoRoom(room) && voiceCallButton}
!useElementCallExclusively && !isVideoRoom && voiceCallButton}
{/* end :TCHAP: */}
=======
{!isVideoRoom && videoCallButton}
{!useElementCallExclusively && !isVideoRoom && voiceCallButton}
>>>>>>> v3.108.0
</>
)}

Expand All @@ -438,12 +384,10 @@ export default function RoomHeader({
</IconButton>
</Tooltip>

<<<<<<< HEAD
{/* :TCHAP: extend-remove-thread-buttons <Tooltip label={_t("common|threads")}>
=======
{showChatButton && <VideoRoomChatButton room={room} />}

>>>>>>> v3.108.0
{/* :TCHAP: extend-remove-thread-buttons <Tooltip label={_t("common|threads")}>
<Tooltip label={_t("common|threads")}>
<IconButton
indicator={notificationLevelToIndicator(threadNotifications)}
Expand Down
21 changes: 4 additions & 17 deletions src/hooks/useUserOnboardingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ export interface UserOnboardingContext {
hasAvatar: boolean;
hasDevices: boolean;
hasDmRooms: boolean;
<<<<<<< HEAD
hasNotificationsEnabled: boolean;
showNotificationsPrompt: boolean;
hasSecureStorage: boolean, // :TCHAP: onboarding-add-secure-backup
hasCheckedUserGuide: boolean, // :TCHAP: onboarding-add-tchap-guide
=======
showNotificationsPrompt: boolean;
>>>>>>> v3.108.0
}

const USER_ONBOARDING_CONTEXT_INTERVAL = 5000;
Expand Down Expand Up @@ -116,10 +112,6 @@ export function useUserOnboardingContext(): UserOnboardingContext {
const dmRooms = DMRoomMap.shared().getUniqueRoomsWithIndividuals() ?? {};
return Boolean(Object.keys(dmRooms).length);
});
<<<<<<< HEAD
const hasNotificationsEnabled = useUserOnboardingContextValue(false, async () => {
return Notifier.isPossible();
});
/** :TCHAP: onboarding-add-secure-backup */
const hasSecureStorage = useUserOnboardingContextValue(false, async (cli) => {
const hasKey = await cli.secretStorage.hasKey()
Expand All @@ -134,15 +126,10 @@ export function useUserOnboardingContext(): UserOnboardingContext {
});
/** end :TCHAP: onboarding-add-tchap-guide */

return useMemo(
() => ({ hasAvatar, hasDevices, hasDmRooms, hasNotificationsEnabled, hasSecureStorage, hasCheckedUserGuide }),
[hasAvatar, hasDevices, hasDmRooms, hasNotificationsEnabled, hasSecureStorage, hasCheckedUserGuide],
=======
const showNotificationsPrompt = useShowNotificationsPrompt();

return useMemo(
() => ({ hasAvatar, hasDevices, hasDmRooms, showNotificationsPrompt }),
[hasAvatar, hasDevices, hasDmRooms, showNotificationsPrompt],
>>>>>>> v3.108.0
() => ({ hasAvatar, hasDevices, hasDmRooms, showNotificationsPrompt, hasSecureStorage, hasCheckedUserGuide }),
[hasAvatar, hasDevices, hasDmRooms, showNotificationsPrompt, hasSecureStorage, hasCheckedUserGuide],
);
}

0 comments on commit 7f1435a

Please sign in to comment.