From 434f29652f849c0a2d2364d75df83852843c3346 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Tue, 22 Nov 2022 22:18:15 +1300 Subject: [PATCH] Just use a toast for download notifications The minor convenience of having that notification doesn't justify me adding the library. If I find another reason for me to have notifications then i'll do it. --- write.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/write.ts b/write.ts index 42ad240..89bd098 100644 --- a/write.ts +++ b/write.ts @@ -1,5 +1,6 @@ -import {NativeModules, PermissionsAndroid, Platform} from 'react-native' +import {PermissionsAndroid, Platform} from 'react-native' import {Dirs, FileSystem} from 'react-native-file-access' +import {toast} from './toast' export const write = async (name: string, data: string) => { const filePath = `${Dirs.DocumentDir}/${name}` @@ -15,5 +16,5 @@ export const write = async (name: string, data: string) => { await FileSystem.writeFile(filePath, data) if (Platform.OS === 'android') await FileSystem.cpExternal(filePath, name, 'downloads') - NativeModules.DownloadModule.show(name) + toast(`Downloaded ${name}`) }