aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
index 94faf59ec..d7f022d3e 100644
--- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
@@ -17,6 +17,7 @@ import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -59,6 +60,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
private TextView mAccountJid;
private LinearLayout membersView;
private LinearLayout mMoreDetails;
+ private RelativeLayout mMucSettings;
private TextView mConferenceType;
private LinearLayout mConferenceInfoTable;
private TextView mConferenceInfoMam;
@@ -255,6 +257,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
mFullJid = findViewById(R.id.muc_jabberid);
membersView = findViewById(R.id.muc_members);
mAccountJid = findViewById(R.id.details_account);
+ mMucSettings = findViewById(R.id.muc_settings);
mMoreDetails = findViewById(R.id.muc_more_details);
mChangeConferenceSettingsButton = findViewById(R.id.change_conference_button);
mChangeConferenceSettingsButton.setOnClickListener(this.mChangeConferenceSettings);
@@ -287,7 +290,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
});
this.mAdvancedMode = getPreferences().getBoolean("advanced_muc_mode", false);
this.mConferenceInfoTable = findViewById(R.id.muc_info_more);
- mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
+ this.mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
this.mConferenceInfoMam = findViewById(R.id.muc_info_mam);
this.mNotifyStatusButton = findViewById(R.id.notification_status_button);
this.mNotifyStatusButton.setOnClickListener(this.mNotifyStatusClickListener);
@@ -332,7 +335,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
this.mAdvancedMode = !menuItem.isChecked();
menuItem.setChecked(this.mAdvancedMode);
getPreferences().edit().putBoolean("advanced_muc_mode", mAdvancedMode).apply();
- mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
+ final boolean online = mConversation != null && mConversation.getMucOptions().online();
+ mConferenceInfoTable.setVisibility(this.mAdvancedMode && online ? View.VISIBLE : View.GONE);
invalidateOptionsMenu();
updateView();
break;
@@ -576,6 +580,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
TextView mRoleAffiliaton = findViewById(R.id.muc_role);
if (mucOptions.online()) {
mMoreDetails.setVisibility(View.VISIBLE);
+ mMucSettings.setVisibility(View.VISIBLE);
+ mConferenceInfoTable.setVisibility(this.mAdvancedMode ? View.VISIBLE : View.GONE);
final String status = getStatus(self);
if (status != null) {
mRoleAffiliaton.setVisibility(View.VISIBLE);
@@ -598,6 +604,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
} else {
mChangeConferenceSettingsButton.setVisibility(View.GONE);
}
+ } else {
+ mMoreDetails.setVisibility(View.GONE);
+ mMucSettings.setVisibility(View.GONE);
+ mConferenceInfoTable.setVisibility(View.GONE);
}
long mutedTill = mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL, 0);