Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
287fe196
Commit
287fe196
authored
Dec 28, 2017
by
Aniket
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #648
parent
d9f9adb6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
30 deletions
+47
-30
LoginActivity.java
...main/java/chat/rocket/android/activity/LoginActivity.java
+10
-4
AbstractServerConfigFragment.java
.../fragment/server_config/AbstractServerConfigFragment.java
+28
-26
BackStackHelper.java
...main/java/chat/rocket/android/helper/BackStackHelper.java
+9
-0
No files found.
app/src/main/java/chat/rocket/android/activity/LoginActivity.java
View file @
287fe196
...
...
@@ -9,6 +9,7 @@ import android.support.v4.app.Fragment;
import
chat.rocket.android.R
;
import
chat.rocket.android.fragment.server_config.LoginFragment
;
import
chat.rocket.android.fragment.server_config.RetryLoginFragment
;
import
chat.rocket.android.helper.BackStackHelper
;
import
chat.rocket.android.service.ConnectivityManager
;
import
chat.rocket.core.interactors.SessionInteractor
;
import
chat.rocket.persistence.realm.repositories.RealmSessionRepository
;
...
...
@@ -93,10 +94,15 @@ public class LoginActivity extends AbstractFragmentActivity implements LoginCont
@Override
protected
boolean
onBackPress
()
{
if
(
BackStackHelper
.
FRAGMENT_TAG
.
equals
(
"internal"
))
{
super
.
onBackPress
();
BackStackHelper
.
FRAGMENT_TAG
=
"login"
;
}
else
if
(
BackStackHelper
.
FRAGMENT_TAG
.
equals
(
"login"
))
{
LoginFragment
loginFragment
=
(
LoginFragment
)
getSupportFragmentManager
()
.
findFragmentById
(
getLayoutContainerForFragment
());
Context
loginActivityContext
=
this
;
loginFragment
.
goBack
(
loginActivityContext
);
}
return
true
;
}
}
app/src/main/java/chat/rocket/android/fragment/server_config/AbstractServerConfigFragment.java
View file @
287fe196
...
...
@@ -6,6 +6,7 @@ import android.support.v4.app.Fragment;
import
chat.rocket.android.R
;
import
chat.rocket.android.fragment.AbstractFragment
;
import
chat.rocket.android.helper.BackStackHelper
;
import
chat.rocket.android.helper.TextUtils
;
public
abstract
class
AbstractServerConfigFragment
extends
AbstractFragment
{
...
...
@@ -36,6 +37,7 @@ public abstract class AbstractServerConfigFragment extends AbstractFragment {
}
protected
void
showFragmentWithBackStack
(
Fragment
fragment
)
{
BackStackHelper
.
FRAGMENT_TAG
=
"internal"
;
getFragmentManager
().
beginTransaction
()
.
add
(
R
.
id
.
content
,
fragment
)
.
addToBackStack
(
null
)
...
...
app/src/main/java/chat/rocket/android/helper/BackStackHelper.java
0 → 100644
View file @
287fe196
package
chat
.
rocket
.
android
.
helper
;
/**
* Created by whocares on 28/12/17.
*/
public
class
BackStackHelper
{
public
static
String
FRAGMENT_TAG
=
"login"
;
}
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