@@ -94,6 +94,7 @@ export function Recording() {
|
|||||||
let id: number | undefined;
|
let id: number | undefined;
|
||||||
try {
|
try {
|
||||||
const result = await apis?.recording?.getCurrentRecording();
|
const result = await apis?.recording?.getCurrentRecording();
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -471,11 +471,11 @@ export function setupRecordingFeature() {
|
|||||||
shareableContent = new ShareableContent();
|
shareableContent = new ShareableContent();
|
||||||
setupMediaListeners();
|
setupMediaListeners();
|
||||||
}
|
}
|
||||||
|
// reset all states
|
||||||
|
recordingStatus$.next(null);
|
||||||
setupAppGroups();
|
setupAppGroups();
|
||||||
setupNewRunningAppGroup();
|
setupNewRunningAppGroup();
|
||||||
setupRecordingListeners();
|
setupRecordingListeners();
|
||||||
// reset all states
|
|
||||||
recordingStatus$.next(null);
|
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('failed to setup recording feature', error);
|
logger.error('failed to setup recording feature', error);
|
||||||
@@ -499,10 +499,6 @@ function normalizeAppGroupInfo(
|
|||||||
export function newRecording(
|
export function newRecording(
|
||||||
appGroup?: AppGroupInfo | number
|
appGroup?: AppGroupInfo | number
|
||||||
): RecordingStatus | null {
|
): RecordingStatus | null {
|
||||||
if (!shareableContent) {
|
|
||||||
return null; // likely called on unsupported platform
|
|
||||||
}
|
|
||||||
|
|
||||||
return recordingStateMachine.dispatch({
|
return recordingStateMachine.dispatch({
|
||||||
type: 'NEW_RECORDING',
|
type: 'NEW_RECORDING',
|
||||||
appGroup: normalizeAppGroupInfo(appGroup),
|
appGroup: normalizeAppGroupInfo(appGroup),
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ function buildMenuConfig(config: TrayMenuConfig): MenuItemConstructorOptions[] {
|
|||||||
}
|
}
|
||||||
if (nativeIcon) {
|
if (nativeIcon) {
|
||||||
nativeIcon = nativeIcon.resize({ width: 20, height: 20 });
|
nativeIcon = nativeIcon.resize({ width: 20, height: 20 });
|
||||||
|
// string icon should be template image
|
||||||
|
if (typeof icon === 'string') {
|
||||||
|
nativeIcon.setTemplateImage(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const submenuConfig = submenu ? buildMenuConfig(submenu) : undefined;
|
const submenuConfig = submenu ? buildMenuConfig(submenu) : undefined;
|
||||||
menuConfig.push({
|
menuConfig.push({
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ export const AFFINE_FLAGS = {
|
|||||||
'com.affine.settings.workspace.experimental-features.enable-meetings.name',
|
'com.affine.settings.workspace.experimental-features.enable-meetings.name',
|
||||||
description:
|
description:
|
||||||
'com.affine.settings.workspace.experimental-features.enable-meetings.description',
|
'com.affine.settings.workspace.experimental-features.enable-meetings.description',
|
||||||
configurable: !isMobile && environment.isMacOs,
|
configurable: !isMobile && environment.isMacOs && BUILD_CONFIG.isElectron,
|
||||||
defaultState: false,
|
defaultState: false,
|
||||||
},
|
},
|
||||||
} satisfies { [key in string]: FlagInfo };
|
} satisfies { [key in string]: FlagInfo };
|
||||||
|
|||||||
Reference in New Issue
Block a user