Move missed call chat badging to calls tab
This commit is contained in:
parent
e5333546db
commit
8047e9cccd
9 changed files with 45 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue