Skip to content

Commit a5fa106

Browse files
Merge branch 'hotfix/3.12.16'
2 parents 190a9a1 + b903577 commit a5fa106

File tree

7 files changed

+27
-5
lines changed

7 files changed

+27
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "worldbrain-extension",
3-
"version": "3.12.15",
3+
"version": "3.12.16",
44
"homepage": "https://memex.garden",
55
"repository": "https://github.com/WorldBrain/Memex",
66
"scripts": {

src/annotations/annotation-save-logic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export async function createAnnotation({
133133
? 'https://memex.social'
134134
: 'http://staging.memex.social'
135135

136-
const link = baseUrl + '/a/' + shareData.remoteId
136+
const link = baseUrl + '/a/' + shareData?.remoteId
137137
navigator.clipboard.writeText(link)
138138
} else if (shareOpts?.shouldShare) {
139139
shareData = await contentSharingBG.shareAnnotation({
@@ -150,7 +150,7 @@ export async function createAnnotation({
150150
privacyLevelOverride ?? shareOptsToPrivacyLvl(shareOpts),
151151
})
152152

153-
if (shareData.remoteId != null) {
153+
if (shareData?.remoteId != null) {
154154
createAndCopyShareLink(
155155
shareData.remoteId,
156156
annotationUrl,

src/in-page-ui/ribbon/react/components/ribbon.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export interface Props extends RibbonSubcomponentProps {
7979
getRootElement: () => HTMLElement
8080
bgScriptBG: RemoteBGScriptInterface
8181
setWriteError: (error: string) => void
82+
showRabbitHoleButton: boolean
8283
}
8384

8485
interface State {
@@ -1683,6 +1684,7 @@ export default class Ribbon extends Component<Props, State> {
16831684
</IconContainer>
16841685
)
16851686
} else {
1687+
console.log('showRabbitHoleButton', this.props.showRabbitHoleButton)
16861688
return (
16871689
<>
16881690
<InnerRibbon
@@ -1775,6 +1777,8 @@ export default class Ribbon extends Component<Props, State> {
17751777
this.renderAItriggerButton()}
17761778
{!this.props.sidebar
17771779
.isSidebarOpen &&
1780+
this.props
1781+
.showRabbitHoleButton &&
17781782
this.renderRabbitHoleTriggerButton()}
17791783
{!this.props.sidebar
17801784
.isSidebarOpen &&

src/in-page-ui/ribbon/react/containers/ribbon/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export default class RibbonContainer extends StatefulUIElement<
133133
})
134134
}
135135
isTrial={this.state.isTrial}
136+
showRabbitHoleButton={this.state.showRabbitHoleButton}
136137
signupDate={this.state.signupDate}
137138
pageActivityIndicatorBG={this.props.pageActivityIndicatorBG}
138139
contentSharingBG={this.props.contentSharing}

src/in-page-ui/ribbon/react/containers/ribbon/logic.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export interface RibbonContainerState {
6868
isTrial: boolean
6969
signupDate: number
7070
themeVariant: MemexThemeVariant
71+
showRabbitHoleButton: boolean
7172
}
7273

7374
export type RibbonContainerEvents = UIEvent<
@@ -184,6 +185,7 @@ export class RibbonContainerLogic extends UILogic<
184185
isTrial: false,
185186
signupDate: null,
186187
themeVariant: null,
188+
showRabbitHoleButton: false,
187189
}
188190
}
189191

@@ -225,6 +227,21 @@ export class RibbonContainerLogic extends UILogic<
225227
} catch (error) {
226228
console.error('error in updatePageCounter', error)
227229
}
230+
231+
const onboardingComplete = await browser.storage.local.get(
232+
'rabbitHoleBetaFeatureAccessOnboardingDone',
233+
)
234+
235+
console.log(
236+
'onboardingcomlete',
237+
onboardingComplete['rabbitHoleBetaFeatureAccessOnboardingDone'],
238+
)
239+
240+
if (onboardingComplete['rabbitHoleBetaFeatureAccessOnboardingDone']) {
241+
this.emitMutation({
242+
showRabbitHoleButton: { $set: true },
243+
})
244+
}
228245
}
229246

230247
async initThemeVariant() {

src/page-activity-indicator/background/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class PageActivityIndicatorBackground {
5757
async setup(): Promise<void> {
5858
await this.deps.jobScheduler.scheduleJob({
5959
name: PERIODIC_SYNC_JOB_NAME,
60-
periodInMinutes: 2,
60+
periodInMinutes: 20,
6161
job: this.syncFollowedListEntriesWithNewActivity,
6262
})
6363
}

0 commit comments

Comments
 (0)