Skip to content
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

feat: add developer option to disable IMAP IDLE #3427

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added
- mark webxdc app context as secure #3413
- Experimental: Related Chats
- Developer option to disable IMAP IDLE #4803

### Changed
- update deltachat-node and deltachat/jsonrpc-client to `v1.123.0`
Expand Down
6 changes: 6 additions & 0 deletions _locales/_untranslated_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"pref_donate": {
"message": "Donate"
},
"pref_disable_idle_title": {
"message": "Disable IMAP IDLE"
},
"pref_disable_idle_explain": {
"message": "Do not use IMAP IDLE extension even if the server supports it. Enabling this option will delay message retrieval, enable it only for testing."
Comment on lines +36 to +39
Copy link
Member

@r10s r10s Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there may be some confusion wrt enable/disable and it/this. here my attempt to clarify wording:

Suggested change
"message": "Disable IMAP IDLE"
},
"pref_disable_idle_explain": {
"message": "Do not use IMAP IDLE extension even if the server supports it. Enabling this option will delay message retrieval, enable it only for testing."
"message": "Skip IMAP IDLE"
},
"pref_disable_idle_explain": {
"message": "Use polling even if the server supports IMAP IDLE. This will delay message retrieval. Use for testing only."

but this is no blocker or so.

},
"clear_chat": {
"message": "Clear Chat"
},
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/dialogs/Settings-Advanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function SettingsAdvanced({
<SettingsExperimentalFeatures
settingsStore={settingsStore}
renderDTSettingSwitch={renderDTSettingSwitch}
renderDeltaSwitch2={renderDeltaSwitch2}
/>
</>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useState, useContext } from 'react'
import { Card, Elevation } from '@blueprintjs/core'
import { RenderDTSettingSwitchType, SettingsSelector } from './Settings'
import {
RenderDeltaSwitch2Type,
RenderDTSettingSwitchType,
SettingsSelector,
} from './Settings'
import { ScreenContext, useTranslationFunction } from '../../contexts'
import { DeltaInput } from '../Login-Styles'
import {
Expand All @@ -22,9 +26,11 @@ const VIDEO_CHAT_INSTANCE_AUTISTICI = 'https://vc.autistici.org/$ROOM'
export function SettingsExperimentalFeatures({
settingsStore,
renderDTSettingSwitch,
renderDeltaSwitch2,
}: {
renderDTSettingSwitch: RenderDTSettingSwitchType
settingsStore: SettingsStoreState
renderDeltaSwitch2: RenderDeltaSwitch2Type
}) {
const tx = window.static_translate
const { openDialog } = useContext(ScreenContext)
Expand Down Expand Up @@ -94,6 +100,11 @@ export function SettingsExperimentalFeatures({
description:
'Careful: opening developer tools on a malicious webxdc app could lead to the app getting access to the Internet',
})}
{renderDeltaSwitch2({
label: tx('pref_disable_idle_title'),
key: 'disable_idle',
description: tx('pref_disable_idle_explain'),
})}
<SettingsSelector
onClick={onClickEdit.bind(null, false)}
currentValue={showVideochatInstance(
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/stores/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface SettingsStoreState {
webrtc_instance: string
download_limit: string
only_fetch_mvbox: string
disable_idle: string
'ui.lastchatid': string
}
desktopSettings: DesktopSettingsType
Expand All @@ -44,6 +45,7 @@ const settingsKeys: Array<keyof SettingsStoreState['settings']> = [
'webrtc_instance',
'download_limit',
'only_fetch_mvbox',
'disable_idle',
'ui.lastchatid',
]

Expand Down
Loading