Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit dc1ab37

Browse files
committed
Actually use https if you select it from the dialog
1 parent 9ca6222 commit dc1ab37

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/main/java/com/zulip/android/activities/LoginActivity.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,15 @@ private void checkForError() {
147147
if (!BuildConfig.DEBUG && serverUri.getScheme().equals("http")) { //Production build and not https
148148
showHTTPDialog(serverURL);
149149
} else {
150-
showBackends(httpScheme, serverURL);
150+
showBackends(serverUri.getScheme(), serverURL);
151151
}
152152
}
153153
}
154154

155155
private void showBackends(String httpScheme, String serverURL) {
156156
Uri serverUri = Uri.parse(serverURL);
157157

158-
if (serverUri.isRelative()) {
159-
serverUri = serverUri.buildUpon().scheme(httpScheme).build();
160-
}
158+
serverUri = serverUri.buildUpon().scheme(httpScheme).build();
161159

162160
// if does not begin with "api.zulip.com" and if the path is empty, use "/api" as first segment in the path
163161
List<String> paths = serverUri.getPathSegments();

0 commit comments

Comments
 (0)