Commit 154f6b60 authored by Wilko Manger's avatar Wilko Manger

Always use homeserver explicitly set in Advanced

parent be18a70e
......@@ -116,6 +116,7 @@ class AdvancedPageState extends State<AdvancedPage> {
RaisedButton(
onPressed: () {
bloc.setHomeserverUrl(homeserverTextController.text);
bloc.homeserverSetViaAdvanced = true;
Navigator.pop(context);
},
child: Text(l(context).confirm.toUpperCase()),
......
......@@ -48,6 +48,7 @@ class StartBloc extends Bloc {
final _homeserverChangedSubj = BehaviorSubject<bool>();
Observable<bool> get homeserverChanged => _homeserverChangedSubj.stream;
bool homeserverSetViaAdvanced = false;
Homeserver get homeserver => di.getHomeserver();
Url _userIdDomain;
......@@ -138,8 +139,10 @@ class StartBloc extends Bloc {
String server = split[1];
try {
final serverUrl = Url.parse("https://$server");
_setHomeserver(serverUrl);
if (!homeserverSetViaAdvanced) {
final serverUrl = Url.parse("https://$server");
_setHomeserver(serverUrl);
}
// Add an '@' if the username does not have one, to allow
// for this input: 'pit:pattle.im'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment