mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-10 07:05:14 +00:00
Merge pull request #17704 from vector-im/t3chguy/ts/5.1
This commit is contained in:
commit
a470c7dd1c
1 changed files with 30 additions and 29 deletions
|
@ -17,16 +17,15 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import VectorBasePlatform from './VectorBasePlatform';
|
||||
import { UpdateCheckStatus } from "matrix-react-sdk/src/BasePlatform";
|
||||
import BaseEventIndexManager, {
|
||||
CrawlerCheckpoint,
|
||||
EventAndProfile,
|
||||
IndexStats,
|
||||
MatrixEvent,
|
||||
MatrixProfile,
|
||||
SearchArgs,
|
||||
SearchResult,
|
||||
ICrawlerCheckpoint,
|
||||
IEventAndProfile,
|
||||
IIndexStats,
|
||||
IMatrixEvent,
|
||||
IMatrixProfile,
|
||||
ISearchArgs,
|
||||
ISearchResult,
|
||||
} from 'matrix-react-sdk/src/indexing/BaseEventIndexManager';
|
||||
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
|
||||
import { _t, _td } from 'matrix-react-sdk/src/languageHandler';
|
||||
|
@ -56,6 +55,8 @@ import ToastStore from "matrix-react-sdk/src/stores/ToastStore";
|
|||
import GenericExpiringToast from "matrix-react-sdk/src/components/views/toasts/GenericExpiringToast";
|
||||
import SettingsStore from 'matrix-react-sdk/src/settings/SettingsStore';
|
||||
|
||||
import VectorBasePlatform from './VectorBasePlatform';
|
||||
|
||||
const electron = window.electron;
|
||||
const isMac = navigator.platform.toUpperCase().includes('MAC');
|
||||
|
||||
|
@ -151,7 +152,7 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||
return this._ipcCall('initEventIndex', userId, deviceId);
|
||||
}
|
||||
|
||||
async addEventToIndex(ev: MatrixEvent, profile: MatrixProfile): Promise<void> {
|
||||
async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
|
||||
return this._ipcCall('addEventToIndex', ev, profile);
|
||||
}
|
||||
|
||||
|
@ -171,31 +172,31 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||
return this._ipcCall('commitLiveEvents');
|
||||
}
|
||||
|
||||
async searchEventIndex(searchConfig: SearchArgs): Promise<SearchResult> {
|
||||
async searchEventIndex(searchConfig: ISearchArgs): Promise<ISearchResult> {
|
||||
return this._ipcCall('searchEventIndex', searchConfig);
|
||||
}
|
||||
|
||||
async addHistoricEvents(
|
||||
events: [EventAndProfile],
|
||||
checkpoint: CrawlerCheckpoint | null,
|
||||
oldCheckpoint: CrawlerCheckpoint | null,
|
||||
events: IEventAndProfile[],
|
||||
checkpoint: ICrawlerCheckpoint | null,
|
||||
oldCheckpoint: ICrawlerCheckpoint | null,
|
||||
): Promise<boolean> {
|
||||
return this._ipcCall('addHistoricEvents', events, checkpoint, oldCheckpoint);
|
||||
}
|
||||
|
||||
async addCrawlerCheckpoint(checkpoint: CrawlerCheckpoint): Promise<void> {
|
||||
async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
return this._ipcCall('addCrawlerCheckpoint', checkpoint);
|
||||
}
|
||||
|
||||
async removeCrawlerCheckpoint(checkpoint: CrawlerCheckpoint): Promise<void> {
|
||||
async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
return this._ipcCall('removeCrawlerCheckpoint', checkpoint);
|
||||
}
|
||||
|
||||
async loadFileEvents(args): Promise<[EventAndProfile]> {
|
||||
async loadFileEvents(args): Promise<IEventAndProfile[]> {
|
||||
return this._ipcCall('loadFileEvents', args);
|
||||
}
|
||||
|
||||
async loadCheckpoints(): Promise<[CrawlerCheckpoint]> {
|
||||
async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
|
||||
return this._ipcCall('loadCheckpoints');
|
||||
}
|
||||
|
||||
|
@ -203,7 +204,7 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||
return this._ipcCall('closeEventIndex');
|
||||
}
|
||||
|
||||
async getStats(): Promise<IndexStats> {
|
||||
async getStats(): Promise<IIndexStats> {
|
||||
return this._ipcCall('getStats');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue