upload url image or file to ipfs
This commit is contained in:
1 parent
9609a8231d
commit
a4a7e00732
33 files changed
+2594
-81
No files matched your search
@@ -11,6 +11,7 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import '../helpers/message_url_image_helper.dart';
|
||||
import '../helpers/reaction_helper.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
import '../models/app_settings.dart';
|
||||
import '../storage/prefs_manager.dart';
|
||||
import '../utils/platform_info.dart';
|
||||
import 'notification_reply.dart';
|
||||
@@ -26,6 +27,11 @@ class NotificationService {
|
||||
|
||||
// Locale for localized notification strings
|
||||
Locale _locale = const Locale('en');
|
||||
String _publicIpfsGateway = AppSettings.defaultPublicIpfsGateway;
|
||||
|
||||
void setPublicIpfsGateway(String gateway) {
|
||||
_publicIpfsGateway = gateway.trim();
|
||||
}
|
||||
|
||||
/// Set the locale for notification strings (call when app locale changes)
|
||||
void setLocale(Locale locale) {
|
||||
@@ -297,7 +303,10 @@ class NotificationService {
|
||||
}) async {
|
||||
if (!urlImagesEnabled) return null;
|
||||
|
||||
final imageUrl = await MessageUrlImageHelper.parseVerified(text);
|
||||
final imageUrl = await MessageUrlImageHelper.parseVerified(
|
||||
text,
|
||||
publicGateway: _publicIpfsGateway,
|
||||
);
|
||||
if (imageUrl == null) return null;
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user