mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Profile: Do not show common chats for bots and Saved Messages (#1550)
This commit is contained in:
parent
2c53bafcfe
commit
04754af53a
@ -23,7 +23,7 @@ import {
|
|||||||
} from '../../config';
|
} from '../../config';
|
||||||
import { IS_TOUCH_ENV } from '../../util/environment';
|
import { IS_TOUCH_ENV } from '../../util/environment';
|
||||||
import {
|
import {
|
||||||
getHasAdminRight, isChatAdmin, isChatChannel, isChatGroup, isUserId,
|
getHasAdminRight, isChatAdmin, isChatChannel, isChatGroup, isUserBot, isUserId,
|
||||||
} from '../../modules/helpers';
|
} from '../../modules/helpers';
|
||||||
import {
|
import {
|
||||||
selectChatMessages,
|
selectChatMessages,
|
||||||
@ -500,6 +500,7 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
|
|
||||||
const activeDownloadIds = selectActiveDownloadIds(global, chatId);
|
const activeDownloadIds = selectActiveDownloadIds(global, chatId);
|
||||||
|
|
||||||
|
let hasCommonChatsTab;
|
||||||
let resolvedUserId;
|
let resolvedUserId;
|
||||||
let user;
|
let user;
|
||||||
if (userId) {
|
if (userId) {
|
||||||
@ -507,9 +508,9 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
} else if (isUserId(chatId)) {
|
} else if (isUserId(chatId)) {
|
||||||
resolvedUserId = chatId;
|
resolvedUserId = chatId;
|
||||||
}
|
}
|
||||||
const hasCommonChatsTab = Boolean(resolvedUserId);
|
|
||||||
if (resolvedUserId) {
|
if (resolvedUserId) {
|
||||||
user = selectUser(global, resolvedUserId);
|
user = selectUser(global, resolvedUserId);
|
||||||
|
hasCommonChatsTab = user && !user.isSelf && !isUserBot(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user