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

Commit 0902f2b

Browse files
committed
Add new realm button code to realmDialog
1 parent 19aa412 commit 0902f2b

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
@@ -132,6 +132,7 @@ public class ZulipActivity extends AppCompatActivity implements
132132
SimpleCursorAdapter streamActvAdapter;
133133
SimpleCursorAdapter subjectActvAdapter;
134134
SimpleCursorAdapter emailActvAdapter;
135+
public static final int ADDREALM_REQUEST_CODE = 201;
135136

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

0 commit comments

Comments
 (0)