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

Ios port clean up cordova variables #92

Open
wants to merge 2 commits into
base: ios-port-filesystem-changes
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions src/Contacts/Views/AddContactView.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ class AddContactView extends ContactFormView {
)
self.actionButtonsContainerView = view
{
if (self.context.Cordova_isMobile === true /* but not context.isMobile */) { // til we have Electron support
if (self.context.deviceInfo.platform === 'android' || self.context.deviceInfo.platform === 'ios') {
self._setup_actionButton_useCamera()
}
self._setup_actionButton_chooseFile()
if (self.context.deviceInfo.platform !== 'ios') {
self._setup_actionButton_chooseFile()
}
}
self.form_containerLayer.appendChild(view.layer)
}
Expand Down
3 changes: 0 additions & 3 deletions src/RequestFunds/Views/CreateRequestFormView.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class CreateRequestFormView extends View {
layer.style.width = '100%'
layer.style.height = '100%'
layer.style.padding = '0 0 40px 0' // actually going to change paddingTop in self.viewWillAppear() if navigation controller
if (self.context.Cordova_isMobile === true) {
layer.style.paddingBottom = '300px' // very hacky, but keyboard UX takes dedication to get right, and would like to save that effort for native app
}
layer.style.overflowY = 'auto'
layer.classList.add( // so that we get autoscroll to form field inputs on mobile platforms
commonComponents_forms.ClassNameForScrollingAncestorOfScrollToAbleElement()
Expand Down
12 changes: 0 additions & 12 deletions src/SendFundsTab/Views/SendFundsView_Base.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@ class SendFundsView extends View {
layer.style.width = '100%'
layer.style.height = '100%'
layer.style.padding = '0' // actually going to change paddingTop in self.viewWillAppear() if navigation controller
if (self.context.Cordova_isMobile === true) {
layer.style.paddingBottom = '300px' // very hacky, but keyboard UX takes dedication to get right, and would like to save that effort for native app
// layer.style.webkitOverflowScrolling = "touch"
// disabling this cause it conflicts with touchup/end of contacts picker
// layer.addEventListener("touchmove", function()
// { // blur currently text input field on user scroll
// const activeElement = document.activeElement
// if (activeElement) {
// activeElement.blur()
// }
// }, false)
}
layer.style.overflowY = 'auto'
layer.classList.add( // so that we get autoscroll to form field inputs on mobile platforms
commonComponents_forms.ClassNameForScrollingAncestorOfScrollToAbleElement()
Expand Down
12 changes: 6 additions & 6 deletions src/WalletWizard/Views/CreateWallet_ConfirmMnemonic_View.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ class CreateWallet_ConfirmMnemonic_View extends BaseView_AWalletWizardScreen {
}
function ____reEnable_userIdleAndScreenSleepFromSubmissionDisable () { // factored because we would like to call this on successful submission too!
self.context.userIdleInWindowController.ReEnable_userIdle()
if (self.context.Cordova_isMobile === true) {
window.plugins.insomnia.allowSleepAgain() // re-enable screen dim/off
}
// if (self.context.Cordova_isMobile === true) {
// window.plugins.insomnia.allowSleepAgain() // re-enable screen dim/off
// }
}
function ___reEnableFormFromSubmissionDisable () {
self.isDisabledFromSubmission = false
Expand All @@ -322,9 +322,9 @@ class CreateWallet_ConfirmMnemonic_View extends BaseView_AWalletWizardScreen {
{ // disable form
self.isDisabledFromSubmission = true
self.context.userIdleInWindowController.TemporarilyDisable_userIdle()
if (self.context.Cordova_isMobile === true) {
window.plugins.insomnia.keepAwake() // disable screen dim/off
}
// if (self.context.Cordova_isMobile === true) {
// window.plugins.insomnia.keepAwake() // disable screen dim/off
// }
//
self.validationMessageLayer.ClearAndHideMessage()
//
Expand Down
12 changes: 6 additions & 6 deletions src/WalletWizard/Views/UseExisting_MetaInfo_View.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ class UseExisting_MetaInfo_View extends BaseView_Wallet_MetaInfo {
{
self.isDisabledFromSubmission = true
self.context.userIdleInWindowController.TemporarilyDisable_userIdle()
if (self.context.Cordova_isMobile === true) {
window.plugins.insomnia.keepAwake() // disable screen dim/off
}
// if (self.context.Cordova_isMobile === true) {
// window.plugins.insomnia.keepAwake() // disable screen dim/off
// }
//
try {
const ret = self.context.monero_utils.seed_and_keys_from_mnemonic(
Expand Down Expand Up @@ -519,9 +519,9 @@ class UseExisting_MetaInfo_View extends BaseView_Wallet_MetaInfo {
}
function ____reEnable_userIdleAndScreenSleepFromSubmissionDisable () { // factored because we would like to call this on successful submission too!
self.context.userIdleInWindowController.ReEnable_userIdle()
if (self.context.Cordova_isMobile === true) {
window.plugins.insomnia.allowSleepAgain() // re-enable screen dim/off
}
// if (self.context.Cordova_isMobile === true) {
// window.plugins.insomnia.allowSleepAgain() // re-enable screen dim/off
// }
}
function ___reEnableFormFromSubmissionDisable () {
self.isDisabledFromSubmission = false
Expand Down