diff --git a/TMessagesProj/src/main/java/org/telegram/ui/UsersSelectActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/UsersSelectActivity.java
index 003a5630e..00a60a19d 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/UsersSelectActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/UsersSelectActivity.java
@@ -449,6 +449,8 @@ public class UsersSelectActivity extends BaseFragment implements NotificationCen
onDonePressed(true);
} else if (id == 2) {
adapter.checkAllAdministrated();
+ } else if (id == 3) {
+ adapter.checkAllForum();
}
}
});
@@ -458,6 +460,7 @@ public class UsersSelectActivity extends BaseFragment implements NotificationCen
ActionBarMenuItem headerItem = menu.addItem(0, R.drawable.ic_ab_other);
headerItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
headerItem.addSubItem(2, R.drawable.group_admin, LocaleController.getString("CheckAllAdministrated", R.string.CheckAllAdministrated));
+ headerItem.addSubItem(3, R.drawable.msg_viewintopic, LocaleController.getString("CheckAllForum", R.string.CheckAllForum));
}
fragmentView = new ViewGroup(context) {
@@ -1085,9 +1088,34 @@ public class UsersSelectActivity extends BaseFragment implements NotificationCen
if (object instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) object;
if (chat.creator || ChatObject.hasAdminRights(chat)) {
- if (selectedCount >= 100) {
+ if (selectedCount >= 200) {
+ break;
+ }
+ GroupCreateSpan span = new GroupCreateSpan(editText.getContext(), object);
+ if (selectedContacts.indexOfKey(span.getUid()) >= 0) {
continue;
}
+ spansContainer.addSpan(span, true);
+ span.setOnClickListener(UsersSelectActivity.this);
+ }
+ }
+ }
+ updateHint();
+ AndroidUtilities.hideKeyboard(editText);
+ if (editText.length() > 0) {
+ editText.setText(null);
+ }
+ checkVisibleRows();
+ }
+
+ public void checkAllForum() {
+ for (Object object : contacts) {
+ if (object instanceof TLRPC.Chat) {
+ TLRPC.Chat chat = (TLRPC.Chat) object;
+ if (ChatObject.isForum(chat)) {
+ if (selectedCount >= 200) {
+ break;
+ }
GroupCreateSpan span = new GroupCreateSpan(editText.getContext(), object);
if (selectedContacts.indexOfKey(span.getUid()) >= 0) {
continue;
diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
index e255a1f54..d1a5ddafd 100644
--- a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
+++ b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
@@ -77,4 +77,5 @@
使用群组名称作为输入框提示
隐藏输入框中的机器人按钮
在消息提示下显示发送者
+ 添加所有话题模式的群组
diff --git a/TMessagesProj/src/main/res/values/strings_na.xml b/TMessagesProj/src/main/res/values/strings_na.xml
index 6364af95a..5e2587153 100644
--- a/TMessagesProj/src/main/res/values/strings_na.xml
+++ b/TMessagesProj/src/main/res/values/strings_na.xml
@@ -78,4 +78,5 @@
Use group name as type message hint
Hide bot button in input field
Show send as under message hint
+ Add forum