mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 10:36:47 +00:00
add to share menu #366
This commit is contained in:
parent
76c56b06fe
commit
1b72ec5649
5 changed files with 23 additions and 12 deletions
|
|
@ -33,6 +33,21 @@
|
|||
<data android:scheme="http" android:host="me.twonly.eu" />
|
||||
<data android:scheme="https" />
|
||||
</intent-filter>
|
||||
<!-- Allow other apps to share links -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http" />
|
||||
<data android:scheme="https" />
|
||||
<data android:host="*" />
|
||||
</intent-filter>
|
||||
<!-- Allow other apps to share links via plain text -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
|
|
|||
|
|
@ -109,10 +109,10 @@ func getPushNotificationData(pushData: String) -> (
|
|||
} else if pushUser != nil {
|
||||
return (
|
||||
pushUser!.displayName,
|
||||
getPushNotificationText(pushNotification: pushNotification, true).0, pushUser!.userID
|
||||
getPushNotificationText(pushNotification: pushNotification, userKnown: true).0, pushUser!.userID
|
||||
)
|
||||
} else {
|
||||
let content = getPushNotificationText(pushNotification: pushNotification, false)
|
||||
let content = getPushNotificationText(pushNotification: pushNotification, userKnown: false)
|
||||
return (
|
||||
content.1, content.0, 1
|
||||
)
|
||||
|
|
@ -205,7 +205,7 @@ func readFromKeychain(key: String) -> String? {
|
|||
return nil
|
||||
}
|
||||
|
||||
func getPushNotificationText(pushNotification: PushNotification, userKnown: bool) -> (String, String) {
|
||||
func getPushNotificationText(pushNotification: PushNotification, userKnown: Bool) -> (String, String) {
|
||||
let systemLanguage = Locale.current.language.languageCode?.identifier ?? "en" // Get the current system language
|
||||
|
||||
var pushNotificationText: [PushKind: String] = [:]
|
||||
|
|
@ -274,7 +274,7 @@ func getPushNotificationText(pushNotification: PushNotification, userKnown: bool
|
|||
var content = pushNotificationText[pushNotification.kind] ?? ""
|
||||
if (content == "") {
|
||||
title = noTranslationFoundTitle
|
||||
body = noTranslationFoundBody
|
||||
content = noTranslationFoundBody
|
||||
}
|
||||
|
||||
if pushNotification.hasAdditionalContent {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
<key>NSExtensionActivationRule</key>
|
||||
<dict>
|
||||
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
|
||||
<integer>1</integer>
|
||||
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
|
||||
<integer>1</integer>
|
||||
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 20f3c2f0a49e4c9be452ecbc84d98054c92974e1
|
||||
Subproject commit 9d04e9e1d0cdba8f1be4b0cbba341706c3cffac9
|
||||
|
|
@ -4,7 +4,6 @@ import 'dart:io';
|
|||
import 'package:camera/camera.dart';
|
||||
import 'package:clock/clock.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_android_volume_keydown/flutter_android_volume_keydown.dart';
|
||||
|
|
@ -353,12 +352,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
sendToGroup: widget.sendToGroup,
|
||||
mediaFileService: mediaFileService,
|
||||
mainCameraController: mc,
|
||||
// previewLink: mc.sharedLinkForPreview,
|
||||
previewLink: kDebugMode
|
||||
? Uri.parse(
|
||||
'https://mastodon.social/@islieb/115883317936171927',
|
||||
)
|
||||
: mc.sharedLinkForPreview,
|
||||
previewLink: mc.sharedLinkForPreview,
|
||||
),
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
return child;
|
||||
|
|
|
|||
Loading…
Reference in a new issue