Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
QuasselDroid-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
66
Issues
66
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Janne Koschinski
QuasselDroid-ng
Commits
63b2416b
Verified
Commit
63b2416b
authored
Apr 29, 2019
by
Janne Koschinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Crash fixes
parent
8162a25c
Pipeline
#475
canceled with stages
in 18 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
17 deletions
+41
-17
app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/client/ClientSettingsActivity.kt
...ldroid/ui/clientsettings/client/ClientSettingsActivity.kt
+1
-1
app/src/main/java/de/kuschku/quasseldroid/util/ui/settings/ServiceBoundSettingsActivity.kt
...seldroid/util/ui/settings/ServiceBoundSettingsActivity.kt
+20
-8
app/src/main/java/de/kuschku/quasseldroid/util/ui/settings/SettingsActivity.kt
...kuschku/quasseldroid/util/ui/settings/SettingsActivity.kt
+20
-8
No files found.
app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/client/ClientSettingsActivity.kt
View file @
63b2416b
...
...
@@ -33,7 +33,7 @@ class ClientSettingsActivity : SettingsActivity(ClientSettingsFragment()),
when
(
pref
)
{
is
ListPreference
->
{
val
f
=
ListPreferenceDialogFragmentCompat
.
newInstance
(
pref
.
getKey
())
f
.
setTargetFragment
(
f
ragment
,
0
)
f
.
setTargetFragment
(
actualF
ragment
,
0
)
f
.
show
(
supportFragmentManager
,
DIALOG_FRAGMENT_TAG
)
true
}
...
...
app/src/main/java/de/kuschku/quasseldroid/util/ui/settings/ServiceBoundSettingsActivity.kt
View file @
63b2416b
...
...
@@ -35,6 +35,7 @@ abstract class ServiceBoundSettingsActivity(private val fragment: Fragment? = nu
protected
open
fun
fragment
():
Fragment
?
=
null
private
var
changeable
:
Changeable
?
=
null
protected
var
actualFragment
:
Fragment
?
=
null
@BindView
(
R
.
id
.
toolbar
)
lateinit
var
toolbar
:
Toolbar
...
...
@@ -48,19 +49,30 @@ abstract class ServiceBoundSettingsActivity(private val fragment: Fragment? = nu
setSupportActionBar
(
toolbar
)
supportActionBar
?.
setDisplayHomeAsUpEnabled
(
true
)
val
fragment
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
fragment_container
)
?:
this
.
fragment
?:
this
.
fragment
()
if
(
fragment
!=
null
)
{
val
transaction
=
supportFragmentManager
.
beginTransaction
()
fragment
.
arguments
=
arguments
transaction
.
replace
(
R
.
id
.
fragment_container
,
fragment
)
transaction
.
commit
()
val
existingFragment
=
savedInstanceState
?.
let
{
supportFragmentManager
.
getFragment
(
it
,
"settings_content"
)
}
actualFragment
=
existingFragment
?:
this
.
fragment
?:
this
.
fragment
()
if
(
existingFragment
==
null
)
{
actualFragment
?.
let
{
val
transaction
=
supportFragmentManager
.
beginTransaction
()
it
.
arguments
=
arguments
transaction
.
replace
(
R
.
id
.
fragment_container
,
it
)
transaction
.
commit
()
}
}
this
.
changeable
=
fragment
as
?
Changeable
}
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
super
.
onSaveInstanceState
(
outState
)
actualFragment
?.
let
{
supportFragmentManager
.
putFragment
(
outState
,
"settings_content"
,
it
)
}
}
private
fun
shouldNavigateAway
(
callback
:
()
->
Unit
)
{
val
changeable
=
this
.
changeable
if
(
changeable
?.
hasChanged
()
==
true
)
{
...
...
app/src/main/java/de/kuschku/quasseldroid/util/ui/settings/SettingsActivity.kt
View file @
63b2416b
...
...
@@ -34,6 +34,7 @@ abstract class SettingsActivity(protected val fragment: Fragment? = null) : Them
protected
open
fun
fragment
():
Fragment
?
=
null
private
var
changeable
:
Changeable
?
=
null
protected
var
actualFragment
:
Fragment
?
=
null
@BindView
(
R
.
id
.
toolbar
)
lateinit
var
toolbar
:
Toolbar
...
...
@@ -47,19 +48,30 @@ abstract class SettingsActivity(protected val fragment: Fragment? = null) : Them
setSupportActionBar
(
toolbar
)
supportActionBar
?.
setDisplayHomeAsUpEnabled
(
true
)
val
fragment
=
supportFragmentManager
.
findFragmentById
(
R
.
id
.
fragment_container
)
?:
this
.
fragment
?:
this
.
fragment
()
if
(
fragment
!=
null
)
{
val
transaction
=
supportFragmentManager
.
beginTransaction
()
fragment
.
arguments
=
arguments
transaction
.
replace
(
R
.
id
.
fragment_container
,
fragment
)
transaction
.
commit
()
val
existingFragment
=
savedInstanceState
?.
let
{
supportFragmentManager
.
getFragment
(
it
,
"settings_content"
)
}
actualFragment
=
existingFragment
?:
this
.
fragment
?:
this
.
fragment
()
if
(
existingFragment
==
null
)
{
actualFragment
?.
let
{
val
transaction
=
supportFragmentManager
.
beginTransaction
()
it
.
arguments
=
arguments
transaction
.
replace
(
R
.
id
.
fragment_container
,
it
)
transaction
.
commit
()
}
}
this
.
changeable
=
fragment
as
?
Changeable
}
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
super
.
onSaveInstanceState
(
outState
)
actualFragment
?.
let
{
supportFragmentManager
.
putFragment
(
outState
,
"settings_content"
,
it
)
}
}
private
fun
shouldNavigateAway
(
callback
:
()
->
Unit
)
{
val
changeable
=
this
.
changeable
if
(
changeable
?.
hasChanged
()
==
true
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment