2019-02-14 03:38:44 +01:00
|
|
|
import { store } from '../_store/store'
|
|
|
|
import { importShowComposeDialog } from '../_components/dialog/asyncDialogs'
|
|
|
|
|
|
|
|
export async function showShareDialogIfNecessary () {
|
2019-08-03 22:49:37 +02:00
|
|
|
const { isUserLoggedIn, openShareDialog } = store.get()
|
2019-02-14 03:38:44 +01:00
|
|
|
store.set({ openShareDialog: false })
|
|
|
|
if (isUserLoggedIn && openShareDialog) {
|
2019-08-03 22:49:37 +02:00
|
|
|
const showComposeDialog = await importShowComposeDialog()
|
2019-02-14 03:38:44 +01:00
|
|
|
showComposeDialog()
|
|
|
|
}
|
|
|
|
}
|