SHA256
Обновить список каналов и кнопку сообщения
This commit is contained in:
@@ -178,7 +178,11 @@ function allFeedSummaries() {
|
||||
...(feed.ownedChannels || []),
|
||||
...(feed.followedUsersChannels || []),
|
||||
...(feed.followedChannels || []),
|
||||
];
|
||||
].filter((summary) => {
|
||||
const typeCode = Number(summary?.channel?.channelTypeCode ?? 1);
|
||||
const channelName = String(summary?.channel?.channelName || '').trim().toLowerCase();
|
||||
return typeCode !== 0 && channelName !== 'stories';
|
||||
});
|
||||
}
|
||||
|
||||
function resolveChannelDisplayName(channelSelector) {
|
||||
@@ -394,7 +398,7 @@ function openRepostModal({ navigate, channels = [], onSubmit }) {
|
||||
.map((item, index) => {
|
||||
const owner = String(item?.ownerLogin || '').trim();
|
||||
const name = String(item?.channelName || '').trim();
|
||||
const label = `${owner || 'my'} / ${name || 'stories'}`;
|
||||
const label = `${owner || 'my'}/${name || 'channel'}`;
|
||||
return `<option value="${index}">${label}</option>`;
|
||||
})
|
||||
.join('');
|
||||
@@ -936,10 +940,12 @@ export function render({ navigate, route }) {
|
||||
return {
|
||||
ownerLogin: String(row?.channel?.ownerLogin || '').trim(),
|
||||
channelName: String(row?.channel?.channelName || '').trim(),
|
||||
channelTypeCode: Number(row?.channel?.channelTypeCode ?? 1),
|
||||
selector: selectorRow,
|
||||
};
|
||||
})
|
||||
.filter(Boolean);
|
||||
.filter(Boolean)
|
||||
.filter((item) => Number(item.channelTypeCode) !== 0 && String(item.channelName || '').trim().toLowerCase() !== 'stories');
|
||||
if (!channels.length) throw new Error('У вас пока нет каналов для репоста.');
|
||||
|
||||
openRepostModal({
|
||||
|
||||
Reference in New Issue
Block a user