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

Commit c0d8d3d

Browse files
committed
Add new realm button code to realmDialog
1 parent cb0a65a commit c0d8d3d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public void onClick(DialogInterface dialog, int whichButton) {
8686
.setPositiveButton(R.string.realm_add, new DialogInterface.OnClickListener() {
8787
@Override
8888
public void onClick(DialogInterface dialog, int id) {
89+
Intent newIntent = new Intent(context, LoginActivity.class);
90+
newIntent.putExtra("FROM_ADDREALM", true);
91+
getActivity().startActivityForResult(newIntent, ZulipActivity.ADDREALM_REQUEST_CODE);
92+
RealmDialog.this.getDialog().cancel();
8993
}
9094
})
9195
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ public class ZulipActivity extends AppCompatActivity implements
146146
SimpleCursorAdapter streamActvAdapter;
147147
SimpleCursorAdapter subjectActvAdapter;
148148
SimpleCursorAdapter emailActvAdapter;
149+
public static final int ADDREALM_REQUEST_CODE = 201;
149150

150151
private BroadcastReceiver onGcmMessage = new BroadcastReceiver() {
151152
public void onReceive(Context contenxt, Intent intent) {

0 commit comments

Comments
 (0)