Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
4bff5a3d
Commit
4bff5a3d
authored
3 years ago
by
MariaZ
Browse files
Options
Downloads
Patches
Plain Diff
Move toast showing function to helper
parent
233d1496
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/helpers/general.js
+5
-0
5 additions, 0 deletions
components/helpers/general.js
components/settings/data-management/delete-data.js
+2
-2
2 additions, 2 deletions
components/settings/data-management/delete-data.js
with
7 additions
and
2 deletions
components/helpers/general.js
0 → 100644
+
5
−
0
View file @
4bff5a3d
import
Toast
from
'
react-native-simple-toast
'
export
const
showToast
=
(
text
)
=>
Toast
.
show
(
text
,
Toast
.
SHORT
,
[
'
RCTModalHostViewController
'
,
'
UIAlertController
'
]
)
This diff is collapsed.
Click to expand it.
components/settings/data-management/delete-data.js
+
2
−
2
View file @
4bff5a3d
...
...
@@ -2,7 +2,6 @@ import React, { Component } from 'react'
import
RNFS
from
'
react-native-fs
'
import
{
Alert
}
from
'
react-native
'
import
PropTypes
from
'
prop-types
'
import
Toast
from
'
react-native-simple-toast
'
import
Button
from
'
../../common/button
'
...
...
@@ -10,6 +9,7 @@ import ConfirmWithPassword from '../common/confirm-with-password'
import
alertError
from
'
../common/alert-error
'
import
{
clearDb
,
isDbEmpty
}
from
'
../../../db
'
import
{
showToast
}
from
'
../../helpers/general
'
import
{
hasEncryptionObservable
}
from
'
../../../local-storage
'
import
settings
from
'
../../../i18n/en/settings
'
import
{
shared
as
sharedLabels
}
from
'
../../../i18n/en/labels
'
...
...
@@ -70,7 +70,7 @@ export default class DeleteData extends Component {
clearDb
()
}
await
this
.
deleteExportedFile
()
Toast
.
show
(
success
.
message
,
Toast
.
LONG
)
show
Toast
(
success
.
message
)
}
catch
(
err
)
{
alertError
(
errors
.
couldNotDeleteFile
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment