* New messages line in threads & Pull to refresh for global threads * Updated snapshot * Using postlist's RefreshControl component * Updated threadlist snapshot * Reverting snapshot * Updated Snapshots * Snapshots updated * Added 'thread last viewed at' to handle new messages line correctly * Lint fix * Updated snapshots * Reverted comparision check * Remove unused code * Batching actions * Do not add new message line for self messages Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
31 lines
847 B
TypeScript
31 lines
847 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
import {ViewTypes} from '@constants';
|
|
|
|
export function updateThreadLastViewedAt(threadId: string, lastViewedAt: number) {
|
|
return {
|
|
type: ViewTypes.THREAD_LAST_VIEWED_AT,
|
|
data: {
|
|
threadId,
|
|
lastViewedAt,
|
|
},
|
|
};
|
|
}
|
|
|
|
export const handleViewingGlobalThreadsScreen = () => (
|
|
{
|
|
type: ViewTypes.VIEWING_GLOBAL_THREADS_SCREEN,
|
|
}
|
|
);
|
|
|
|
export const handleNotViewingGlobalThreadsScreen = () => ({
|
|
type: ViewTypes.NOT_VIEWING_GLOBAL_THREADS_SCREEN,
|
|
});
|
|
|
|
export const handleViewingGlobalThreadsAll = () => ({
|
|
type: ViewTypes.VIEWING_GLOBAL_THREADS_ALL,
|
|
});
|
|
|
|
export const handleViewingGlobalThreadsUnreads = () => ({
|
|
type: ViewTypes.VIEWING_GLOBAL_THREADS_UNREADS,
|
|
});
|