Skip to content

Commit

Permalink
Disable template popup in mobile, #2985
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbotris committed May 7, 2021
1 parent a4af25c commit 6b007bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/mail/editor/MailEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ function createMailEditorDialog(model: SendMailModel, blockExternalContent: bool
}


const templatePopupModel = logins.isInternalUserLoggedIn()
const templatePopupModel = logins.isInternalUserLoggedIn() && !isApp()
? new TemplatePopupModel(locator.eventController, logins, locator.entityClient)
: null

Expand Down
9 changes: 3 additions & 6 deletions src/templates/view/TemplatePopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {getSharedGroupName, hasCapabilityOnGroup} from "../../sharing/GroupUtils
import {createInitialTemplateListIfAllowed} from "../TemplateGroupUtils"
import {getConfirmation} from "../../gui/base/GuiUtils"
import {ScrollSelectList} from "../../gui/ScrollSelectList"
import {isApp} from "../../api/common/Env"

export const TEMPLATE_POPUP_HEIGHT = 340;
export const TEMPLATE_POPUP_TWO_COLUMN_MIN_WIDTH = 600;
Expand Down Expand Up @@ -91,11 +90,9 @@ export class TemplatePopup implements ModalComponent {
this._rect = rect
this._onSelect = onSelect
this._initialWindowWidth = window.innerWidth
this._resizeListener =
isApp()
? noOp
: () => this._close()

this._resizeListener = () => {
this._close()
}
this._searchBarValue = stream(initialSearchString)
this._templateModel = templateModel

Expand Down

0 comments on commit 6b007bc

Please sign in to comment.