This repository was archived by the owner on Jul 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
app/src/main/java/com/zulip/android/networking Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 44import org .json .JSONObject ;
55
66import android .app .Activity ;
7+ import android .content .Intent ;
78import android .util .Log ;
89import android .widget .Toast ;
910
1011import com .zulip .android .activities .DevAuthActivity ;
1112import com .zulip .android .activities .LoginActivity ;
13+ import com .zulip .android .activities .ZulipActivity ;
1214import com .zulip .android .util .ZLog ;
1315import com .zulip .android .ZulipApp ;
1416
@@ -88,6 +90,20 @@ protected void onPostExecute(String result) {
8890 Log .wtf ("login" , "We shouldn't have gotten this far." );
8991 }
9092
93+ private void loginThroughAddRealm (JSONObject jsonObject ) {
94+ try {
95+ Intent intent = new Intent (context , ZulipActivity .class );
96+ intent .putExtra ("realmName" , realmName );
97+ intent .putExtra ("api_key" , jsonObject .getString ("api_key" ));
98+ intent .putExtra ("email" , username );
99+ intent .putExtra ("serverURL" , serverURL );
100+ context .setResult (Activity .RESULT_OK , intent );
101+ context .finish ();
102+ } catch (JSONException e ) {
103+ ZLog .logException (e );
104+ }
105+ }
106+
91107 @ Override
92108 protected void onCancelled (String result ) {
93109 super .onCancelled (result );
You can’t perform that action at this time.
0 commit comments