Move missed call chat badging to calls tab

This commit is contained in:
ayumi-signal 2024-03-04 14:26:49 -08:00 committed by GitHub
parent e5333546db
commit 8047e9cccd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 45 additions and 28 deletions

View file

@ -6,13 +6,23 @@ import type { CallHistoryDetails } from '../types/CallDisposition';
import { strictAssert } from '../util/assert';
let callsHistoryData: ReadonlyArray<CallHistoryDetails>;
let callsHistoryUnreadCount: number;
export async function loadCallsHistory(): Promise<void> {
await dataInterface.cleanupCallHistoryMessages();
callsHistoryData = await dataInterface.getAllCallHistory();
callsHistoryUnreadCount = await dataInterface.getCallHistoryUnreadCount();
}
export function getCallsHistoryForRedux(): ReadonlyArray<CallHistoryDetails> {
strictAssert(callsHistoryData != null, 'callHistory has not been loaded');
return callsHistoryData;
}
export function getCallsHistoryUnreadCountForRedux(): number {
strictAssert(
callsHistoryUnreadCount != null,
'callHistory has not been loaded'
);
return callsHistoryUnreadCount;
}