Page MenuHomePhabricator

D13724.id.diff
No OneTemporary

D13724.id.diff

diff --git a/lib/utils/__mocks__/config.js b/lib/utils/__mocks__/config.js
--- a/lib/utils/__mocks__/config.js
+++ b/lib/utils/__mocks__/config.js
@@ -56,6 +56,7 @@
getNotifByteSize: jest.fn(),
normalizeUint8ArrayForBlobUpload: jest.fn(),
},
+ showAlert: jest.fn(),
});
const hasConfig = (): boolean => true;
diff --git a/lib/utils/config.js b/lib/utils/config.js
--- a/lib/utils/config.js
+++ b/lib/utils/config.js
@@ -31,6 +31,7 @@
+olmAPI: OlmAPI,
+sqliteAPI: SQLiteAPI,
+encryptedNotifUtilsAPI: EncryptedNotifUtilsAPI,
+ +showAlert: (title: string, message: string) => mixed,
};
let registeredConfig: ?Config = null;
diff --git a/native/config.js b/native/config.js
--- a/native/config.js
+++ b/native/config.js
@@ -1,6 +1,6 @@
// @flow
-import { Platform } from 'react-native';
+import { Alert, Platform } from 'react-native';
import { registerConfig } from 'lib/utils/config.js';
@@ -24,4 +24,5 @@
olmAPI,
sqliteAPI,
encryptedNotifUtilsAPI,
+ showAlert: (title: string, message: string) => Alert.alert(title, message),
});
diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -128,6 +128,8 @@
olmAPI,
sqliteAPI,
encryptedNotifUtilsAPI,
+ showAlert: (title: string, message: string) =>
+ window.alert(`${title}: ${message}`),
});
const versionBroadcast = new BroadcastChannel('comm_version');

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 8:03 PM (18 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696133
Default Alt Text
D13724.id.diff (1 KB)

Event Timeline