Skip to content

Commit e7361d9

Browse files
committed
Login related customization.
1 parent 2e55cc5 commit e7361d9

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

app/src/debug/res/values/setup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- webview_login_url should be empty in debug mode to show login url input screen
4+
this will be useful in switching the environments during testing -->
5+
<string name="webview_login_url" translatable="false" />
6+
</resources>

app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
454454
public void onPageFinished(WebView view, String url) {
455455
super.onPageFinished(view, url);
456456

457+
//scroll to top when url loads
458+
//because directly loading Telekom login page it scrolls down automatically
459+
view.scrollTo(0,0);
460+
457461
accountSetupWebviewBinding.loginWebviewProgressBar.setVisibility(View.GONE);
458462
accountSetupWebviewBinding.loginWebview.setVisibility(View.VISIBLE);
459463

app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ protected void onNewIntent(Intent intent) {
109109
protected void onRestart() {
110110
Log_OC.v(TAG, "onRestart() start");
111111
super.onRestart();
112-
mixinRegistry.onRestart();
112+
//Fix of NMC-2303 and NMC-2441
113+
if (enableAccountHandling) {
114+
mixinRegistry.onRestart();
115+
}
113116
}
114117

115118
private void onThemeSettingsModeChanged() {

app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,8 @@ protected void onStop() {
11691169

11701170
@Subscribe(threadMode = ThreadMode.MAIN)
11711171
public void onAccountRemovedEvent(AccountRemovedEvent event) {
1172-
restart();
1172+
//NMC customization
1173+
finish();
11731174
}
11741175

11751176
/**

app/src/main/res/values/setup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<color name="login_text_hint_color">#7fC0E3</color>
5454

5555
<!-- Multiaccount support -->
56-
<bool name="multiaccount_support">true</bool>
56+
<bool name="multiaccount_support">false</bool>
5757

5858
<!-- Drawer options -->
5959
<bool name="recently_modified_enabled">false</bool>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- webview_login_url prod -->
4+
<string name="webview_login_url" translatable="false" >https://magentacloud.de/index.php/login/flow</string>
5+
</resources>

0 commit comments

Comments
 (0)