Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
dbc646a1
Commit
dbc646a1
authored
3 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
migration cleanup
Change-Id: I3af1d23f9b8f658e9f199eac2ef5810030e14f8d
parent
b5095505
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/app/src/main/java/cx/ring/fragments/AccountMigrationFragment.kt
+16
-22
16 additions, 22 deletions
...c/main/java/cx/ring/fragments/AccountMigrationFragment.kt
with
16 additions
and
22 deletions
ring-android/app/src/main/java/cx/ring/fragments/AccountMigrationFragment.kt
+
16
−
22
View file @
dbc646a1
...
@@ -61,21 +61,19 @@ class AccountMigrationFragment : Fragment() {
...
@@ -61,21 +61,19 @@ class AccountMigrationFragment : Fragment() {
}
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
parent
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
{
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
parent
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
{
binding
=
FragAccountMigrationBinding
.
inflate
(
inflater
,
parent
,
false
)
return
FragAccountMigrationBinding
.
inflate
(
inflater
,
parent
,
false
).
apply
{
return
binding
!!
.
root
ringPassword
.
setOnEditorActionListener
{
v
:
TextView
,
actionId
:
Int
,
event
:
KeyEvent
?
->
}
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
binding
!!
.
ringPassword
.
setOnEditorActionListener
{
v
:
TextView
,
actionId
:
Int
,
event
:
KeyEvent
?
->
actionId
==
EditorInfo
.
IME_ACTION_NEXT
&&
checkPassword
(
v
,
null
)
actionId
==
EditorInfo
.
IME_ACTION_NEXT
&&
checkPassword
(
v
,
null
)
}
}
binding
!!
.
ringPassword
.
onFocusChangeListener
=
View
.
OnFocusChangeListener
{
v
:
View
,
hasFocus
:
Boolean
->
ringPassword
.
onFocusChangeListener
=
View
.
OnFocusChangeListener
{
v
:
View
,
hasFocus
:
Boolean
->
if
(!
hasFocus
)
{
if
(!
hasFocus
)
{
checkPassword
(
v
as
TextView
,
null
)
checkPassword
(
v
as
TextView
,
null
)
}
}
}
}
binding
!!
.
ringMigrateBtn
.
setOnClickListener
{
initAccountMigration
(
binding
!!
.
ringPassword
.
text
.
toString
())
}
ringMigrateBtn
.
setOnClickListener
{
initAccountMigration
(
ringPassword
.
text
.
toString
())
}
binding
!!
.
deleteBtn
.
setOnClickListener
{
initAccountDelete
()
}
deleteBtn
.
setOnClickListener
{
initAccountDelete
()
}
binding
=
this
}.
root
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
...
@@ -150,17 +148,13 @@ class AccountMigrationFragment : Fragment() {
...
@@ -150,17 +148,13 @@ class AccountMigrationFragment : Fragment() {
private
fun
handleMigrationState
(
newState
:
String
)
{
private
fun
handleMigrationState
(
newState
:
String
)
{
migratingAccount
=
false
migratingAccount
=
false
if
(
TextUtils
.
isEmpty
(
newState
))
{
mProgress
?.
let
{
progress
->
if
(
mProgress
!=
null
)
{
progress
.
dismiss
()
mProgress
!!
.
dismiss
()
mProgress
=
null
mProgress
=
null
}
}
if
(
TextUtils
.
isEmpty
(
newState
))
{
return
return
}
}
if
(
mProgress
!=
null
)
{
mProgress
!!
.
dismiss
()
mProgress
=
null
}
val
dialogBuilder
:
AlertDialog
.
Builder
=
MaterialAlertDialogBuilder
(
requireContext
())
val
dialogBuilder
:
AlertDialog
.
Builder
=
MaterialAlertDialogBuilder
(
requireContext
())
dialogBuilder
.
setPositiveButton
(
android
.
R
.
string
.
ok
)
{
dialog
:
DialogInterface
?,
id
:
Int
->
}
dialogBuilder
.
setPositiveButton
(
android
.
R
.
string
.
ok
)
{
dialog
:
DialogInterface
?,
id
:
Int
->
}
var
success
=
false
var
success
=
false
...
...
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