@umituz/react-native-firebase 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-firebase",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Domain-Driven Design Firebase client for React Native apps with type-safe operations and singleton pattern",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -70,4 +70,3 @@
|
|
|
70
70
|
"LICENSE"
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
|
-
|
|
@@ -183,6 +183,23 @@ class FirebaseAnalyticsService implements IAnalyticsService {
|
|
|
183
183
|
getCurrentUserId(): string | null {
|
|
184
184
|
return this.userId;
|
|
185
185
|
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Log screen view
|
|
189
|
+
*/
|
|
190
|
+
async logScreenView(params: {
|
|
191
|
+
screen_name: string;
|
|
192
|
+
screen_class?: string;
|
|
193
|
+
}): Promise<void> {
|
|
194
|
+
try {
|
|
195
|
+
await this.logEvent('screen_view', {
|
|
196
|
+
screen_name: params.screen_name,
|
|
197
|
+
screen_class: params.screen_class || params.screen_name,
|
|
198
|
+
});
|
|
199
|
+
} catch (_error) {
|
|
200
|
+
// Silent fail
|
|
201
|
+
}
|
|
202
|
+
}
|
|
186
203
|
}
|
|
187
204
|
|
|
188
205
|
export const firebaseAnalyticsService = new FirebaseAnalyticsService();
|