Skip to content

Commit

Permalink
feat(android): unlock sync feature (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
iorate committed Nov 28, 2023
1 parent 3d5a4a8 commit 2d0096d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/scripts/clouds/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ async function launchAltFlow(params: { url: string }): Promise<string> {
if (openerTabId == null) {
throw new Error('failed to get the current tab');
}
// #if !FIREFOX
const { id: authorizationTabId } = await browser.tabs.create({
openerTabId,
url: params.url,
});
/* #else
const { id: authorizationTabId } = await browser.tabs.create(
(await browser.runtime.getPlatformInfo()).os === 'android'
? { url: params.url }
: { openerTabId, url: params.url },
);
*/
// #endif
if (authorizationTabId == null) {
throw new Error('failed to open the authorization tab');
}
Expand Down
10 changes: 0 additions & 10 deletions src/scripts/options/sync-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,18 +414,8 @@ const SyncCategories: React.VFC<{ disabled: boolean }> = ({ disabled }) => (
export const SyncSection: React.VFC = () => {
const {
initialItems: { syncCloudId: initialSyncCloudId },
/* #if FIREFOX
platformInfo: { os },
*/
// #endif
} = useOptionsContext();
const [syncCloudId, setSyncCloudId] = useState(initialSyncCloudId);
/* #if FIREFOX
if (os === 'android') {
return null;
}
*/
// #endif
return (
<Section aria-labelledby="syncSectionTitle" id="sync">
<SectionHeader>
Expand Down

0 comments on commit 2d0096d

Please sign in to comment.