Skip to content

Commit

Permalink
add menu item to join trifa public group
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Mar 28, 2023
1 parent 5e200f1 commit 9a0683c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,8 @@ public void onNothingSelected(AdapterView<?> parentView)
PrimaryDrawerItem item5 = new PrimaryDrawerItem().withIdentifier(5).withName(
R.string.MainActivity_about).withIcon(GoogleMaterial.Icon.gmd_info);
PrimaryDrawerItem item6 = new PrimaryDrawerItem().withIdentifier(6).withName(
R.string.MainActivity_join_trifa_groupchat).withIcon(GoogleMaterial.Icon.gmd_info);
PrimaryDrawerItem item7 = new PrimaryDrawerItem().withIdentifier(7).withName(
R.string.MainActivity_exit).withIcon(GoogleMaterial.Icon.gmd_exit_to_app);
final Drawable d1 = new IconicsDrawable(this).icon(FontAwesome.Icon.faw_lock).color(
getResources().getColor(R.color.colorPrimaryDark)).sizeDp(100);
Expand All @@ -1392,7 +1394,9 @@ public boolean onProfileChanged(View view, IProfile profile, boolean currentProf
new DividerDrawerItem(),
item2, item3, item4, item5,
new DividerDrawerItem(),
item6).withTranslucentStatusBar(
item6,
new DividerDrawerItem(),
item7).withTranslucentStatusBar(
false).withAccountHeader(main_drawer_header).withOnDrawerItemClickListener(
new Drawer.OnDrawerItemClickListener()
{
Expand Down Expand Up @@ -1489,6 +1493,25 @@ else if (position == 5)
// -- clear Glide cache --
}
else if (position == 8)
{
// Join TRIfA public NGC group chat
try
{
if (is_tox_started)
{
JoinPublicGroupActivity.show_join_public_group_activity(view.getContext(), TOX_TRIFA_PUBLIC_GROUPID);
}
else
{
display_toast_with_context_custom_duration(view.getContext(),"Tox not yet started!", 2000, 100);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
else if (position == 10)
{
// Exit
try
Expand Down
1 change: 1 addition & 0 deletions android-refimpl-app/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
<string name="MainActivity_profile">Profile</string>
<string name="MainActivity_settings">Settings</string>
<string name="MainActivity_logout_login">Logout/Login</string>
<string name="MainActivity_join_trifa_groupchat">Join Info Group</string>
<string name="MainActivity_maint">Maintenance</string>
<string name="MainActivity_about">About</string>
<string name="MainActivity_exit">Exit</string>
Expand Down

0 comments on commit 9a0683c

Please sign in to comment.