Merge branch 'media-attachment-updates' into 'main'

Media attachment updates

See merge request mysocialportal/relatica!30
codemagic-setup
HankG 2023-04-04 23:49:28 +00:00
commit d2aca21f7b
23 zmienionych plików z 498 dodań i 162 usunięć

Wyświetl plik

@ -1,16 +1,19 @@
# Relatica Change Log
## Unreleased Updates
## Version 0.4.0 (beta), 04 April 2023
* Changes
* Uses "Sentence Capitalization" keyboard to have shift on for first letter of beginning of each
sentence.
* Add version error check messages on DM sending and Resharing Diaspora posts for pre-2023.03
Friendica servers
* Using media_kit instead of video_player library on iOS
* Fixes
* Keyboard on Search Screen now dismisses when user clicks outside of the search text field or
hits "Done" button (which also initiates the search).
* GIF images load correctly
* New Features
* Adds video playing capability to desktop
## Version 0.3.0 (beta), 22 March 2023

Wyświetl plik

@ -1,24 +1,26 @@
# Relatica Developer Notes
Relatica is written with [Flutter](https://flutter.dev/). Please follow
Relatica is written with [Flutter](https://flutter.dev/). Please follow
[the install instructions](https://docs.flutter.dev/get-started/install) for your platform
to get started with development.
to get started with development.
## Linux Development
For Linux development be sure that libsecret-1-dev and libjsoncpp-dev are installed on the machine.
Also the ObjectBox library requires a more recent version of CMake than what is packaged in the
standard Flutter Snap install instructions. To get this working correctly on Linux you will
have to do the
For Linux development be sure that libmpv-dev, mpv, libsecret-1-dev and libjsoncpp-dev are installed on the machine.
Also the ObjectBox library requires a more recent version of CMake than what is packaged in the
standard Flutter Snap install instructions. To get this working correctly on Linux you will
have to do the
[manual installation version of the Flutter install instructions](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually).
## Additional Build Steps
Whenever a model is changed that is stored in ObjectBox it is necessary to execute the command:
```bash
flutter pub run build_runner build
```
Whenever building for deployment on a Linux machine you need to manually copy the libobjectbox.so
library file into the bundle's lib folder before zipping up. This issue has been filed with the
Whenever building for deployment on a Linux machine you need to manually copy the libobjectbox.so
library file into the bundle's lib folder before zipping up. This issue has been filed with the
ObjectBox team to address: https://github.com/objectbox/objectbox-dart/issues/504

Wyświetl plik

@ -6,11 +6,12 @@ For more information about the current beta testing program
# Latest Binaries:
* [Android v0.3.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.3.0%2Frelatica_v0.3.0.apk.zip)
* iPhone/iPad v0.3.0: This is only available through TestFlight. Please contact me for access.
* [Windows (Intel) v0.3.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.3.0%2FRelatica_v0.3.0_win_x64.zip)
* macOS v0.3.0 This is only available through TestFlight. Please contact me for access.
* [Linux (Intel Ubuntu 22) v0.3.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.3.0%2Frelatica_v0.3.0_linux_x64_ubuntu22.zip)
* [Android v0.4.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.4.0%2Frelatica_v0.4.0.apk.zip)
* iPhone/iPad v0.4.0: This is only available through TestFlight. Please contact me for access.
* [Windows (Intel) v0.4.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.4.0%2Frelatica_v0.4.0_win_x64.zip)
* [macOS v0.4.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.4.0%2FRelatica_v0.4.0_mac.zip). The
TestFlight version is stuck at 0.3.0 for the time being.
* [Linux (Intel Ubuntu 22) v0.4.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.4.0%2Frelatica_v0.4.0_linux_x64_ubuntu22.zip)
## Mobile
@ -49,7 +50,7 @@ prompted again. The system does not work without the storage mechanism at this t
### Linux
1. Install libsecret-1-0 and libjsoncpp25 libraries from your system's package manager.
1. Install libmpv-dev, libsecret-1-0, and libjsoncpp25 libraries from your system's package manager.
2. Download the latest version (see above)
2. Unzip the archive.
3. Copy to wherever you want to store the applications

Wyświetl plik

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -38,4 +38,11 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end

Wyświetl plik

@ -47,23 +47,29 @@ PODS:
- FMDB/standard (2.7.5)
- image_picker_ios (0.0.1):
- Flutter
- ObjectBox (1.8.1-rc)
- media_kit_libs_ios_video (1.0.0):
- Flutter
- media_kit_native_event_loop (1.0.0):
- Flutter
- media_kit_video (0.0.1):
- Flutter
- ObjectBox (1.8.1)
- objectbox_flutter_libs (0.0.1):
- Flutter
- ObjectBox (= 1.8.1-rc)
- ObjectBox (= 1.8.1)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SDWebImage (5.13.2):
- SDWebImage/Core (= 5.13.2)
- SDWebImage/Core (5.13.2)
- SDWebImage (5.15.5):
- SDWebImage/Core (= 5.15.5)
- SDWebImage/Core (5.15.5)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- SwiftyGif (5.4.3)
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter
- video_player_avfoundation (0.0.1):
@ -77,6 +83,9 @@ DEPENDENCIES:
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
- objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
@ -108,6 +117,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_web_auth_2/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
media_kit_libs_ios_video:
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
media_kit_native_event_loop:
:path: ".symlinks/plugins/media_kit_native_event_loop/ios"
media_kit_video:
:path: ".symlinks/plugins/media_kit_video/ios"
objectbox_flutter_libs:
:path: ".symlinks/plugins/objectbox_flutter_libs/ios"
path_provider_foundation:
@ -131,17 +146,20 @@ SPEC CHECKSUMS:
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_web_auth_2: a1bc00762c408a8f80b72a538cd7ff5b601c3e71
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
ObjectBox: 7615cc462f2976cb45127d301a17cb473edf3f9e
objectbox_flutter_libs: 55835e03ff76bf9d5ce0a41a2ef3902d2e8c1f20
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
media_kit_libs_ios_video: 045418d93c495fb3eaa7b8263839d991c206fa14
media_kit_native_event_loop: 0d273668d0ad6011258e91db0e0301370a721195
media_kit_video: 01504b1f7a2b4d11ebcf8637cd8919a4ed2452ed
ObjectBox: a7900d5335218cd437cbc080b7ccc38a5211f7b4
objectbox_flutter_libs: 61d74196d924fbc773da5f5757d1e9fab7b3cc78
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: 1df1bb3ed89ef4be6115286519e24a9fad12e640
COCOAPODS: 1.11.3
COCOAPODS: 1.12.0

Wyświetl plik

@ -341,7 +341,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -361,6 +361,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -420,7 +421,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -469,7 +470,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -491,6 +492,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -515,6 +517,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

Wyświetl plik

@ -0,0 +1,130 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:relatica/controls/audio_video/media_kit_av_control.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../globals.dart';
import '../../services/setting_service.dart';
import '../../utils/snackbar_builder.dart';
import 'video_player_lib_av_control.dart';
final _shownVideos = <String>{};
final _useVideoPlayer = kIsWeb || Platform.isAndroid;
final _useMediaKit = Platform.isIOS ||
Platform.isWindows ||
Platform.isMacOS ||
Platform.isLinux;
class AVControl extends StatefulWidget {
final String videoUrl;
final String description;
final double width;
final double height;
const AVControl({
super.key,
required this.videoUrl,
required this.width,
required this.height,
required this.description,
});
@override
State<AVControl> createState() => _AVControlState();
}
class _AVControlState extends State<AVControl> {
void showVideo() {
_shownVideos.add(widget.videoUrl);
setState(() {});
}
@override
Widget build(BuildContext context) {
final shown = !context.watch<SettingsService>().lowBandwidthMode ||
_shownVideos.contains(widget.videoUrl);
final placeHolderBox = SizedBox(
width: widget.width,
height: widget.height,
child: const Card(
color: Colors.black12,
shape: RoundedRectangleBorder(),
child: Icon(Icons.movie)),
);
if (!shown) {
return GestureDetector(
onTap: showVideo,
child: placeHolderBox,
);
}
if (_useVideoPlayer) {
return VideoPlayerLibAvControl(
videoUrl: widget.videoUrl,
width: widget.width,
height: widget.height,
);
}
if (_useMediaKit) {
return MediaKitAvControl(
videoUrl: widget.videoUrl,
width: widget.width,
height: widget.height,
);
}
return buildStandinWidget(context);
}
Widget buildStandinWidget(BuildContext context) {
return GestureDetector(
onTap: () async {
final confirm = await showYesNoDialog(
context, 'Open Link in external app? ${widget.videoUrl}');
if (confirm != true) {
return;
}
if (await canLaunchUrl(Uri.parse(widget.videoUrl))) {
if (context.mounted) {
buildSnackbar(
context,
'Attempting to launch video: ${widget.videoUrl}',
);
}
await launchUrl(Uri.parse(widget.videoUrl));
} else {
if (context.mounted) {
buildSnackbar(
context, 'Unable to launch video: ${widget.videoUrl}');
}
}
},
child: SizedBox(
height: widget.height,
width: widget.width,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
widget.description.isNotEmpty
? widget.description
: 'Video: ${widget.videoUrl}',
softWrap: true,
),
),
),
],
),
));
}
}

Wyświetl plik

@ -0,0 +1,111 @@
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:media_kit/media_kit.dart';
import 'package:media_kit_video/media_kit_video.dart';
class MediaKitAvControl extends StatefulWidget {
final String videoUrl;
final double width;
final double height;
const MediaKitAvControl({
super.key,
required this.videoUrl,
required this.width,
required this.height,
});
@override
State<MediaKitAvControl> createState() => _MediaKitAvControlState();
}
class _MediaKitAvControlState extends State<MediaKitAvControl> {
static final _logger = Logger('$MediaKitAvControl');
final player = Player();
VideoController? controller;
var needToOpen = true;
@override
void initState() {
super.initState();
Future.microtask(() async {
_logger.info('initializing');
controller = await VideoController.create(player.handle);
_logger.info('initialized');
if (context.mounted) {
setState(() {});
}
});
}
@override
void dispose() {
Future.microtask(() async {
await controller?.dispose();
await player.dispose();
});
super.dispose();
}
@override
void deactivate() {
player.pause();
super.deactivate();
}
void toggleVideoPlay() async {
_logger.fine('Toggling play on: ${widget.videoUrl}');
if (needToOpen) {
await player.open(Media(widget.videoUrl), play: false);
needToOpen = false;
}
player.playOrPause();
setState(() {});
}
void resetPlay() async {
await player.pause();
await player.seek(Duration.zero);
await player.play();
setState(() {});
}
double get height => widget.height - 50;
double get width => widget.width;
@override
Widget build(BuildContext context) {
print('Building MediaKit Control');
if (controller == null) {
return const Center(
child: CircularProgressIndicator(),
);
}
return GestureDetector(
onTap: toggleVideoPlay,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Video(
controller: controller,
width: width,
height: height,
),
Row(
children: [
IconButton(
icon: player.state.playing
? const Icon(Icons.pause)
: const Icon(Icons.play_arrow),
onPressed: toggleVideoPlay,
),
IconButton(onPressed: resetPlay, icon: const Icon(Icons.replay)),
],
)
],
),
);
}
}

Wyświetl plik

@ -1,17 +1,14 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:video_player/video_player.dart';
import '../services/setting_service.dart';
final _shownVideos = <String>{};
class VideoControl extends StatefulWidget {
class VideoPlayerLibAvControl extends StatefulWidget {
final String videoUrl;
final double width;
final double height;
const VideoControl({
const VideoPlayerLibAvControl({
super.key,
required this.videoUrl,
required this.width,
@ -19,24 +16,24 @@ class VideoControl extends StatefulWidget {
});
@override
State<VideoControl> createState() => _VideoControlState();
State<VideoPlayerLibAvControl> createState() =>
_VideoPlayerLibAvControlState();
}
class _VideoControlState extends State<VideoControl> {
class _VideoPlayerLibAvControlState extends State<VideoPlayerLibAvControl> {
late final VideoPlayerController videoPlayerController;
var needsToLoad = true;
@override
void initState() {
videoPlayerController = VideoPlayerController.network(widget.videoUrl)
..initialize().then((_) {
setState(() {});
});
super.initState();
videoPlayerController = VideoPlayerController.network(widget.videoUrl);
}
@override
void dispose() {
super.dispose();
videoPlayerController.dispose();
super.dispose();
}
@override
@ -45,12 +42,11 @@ class _VideoControlState extends State<VideoControl> {
super.deactivate();
}
void showVideo() {
_shownVideos.add(widget.videoUrl);
setState(() {});
}
void toggleVideoPlay() {
void toggleVideoPlay() async {
if (needsToLoad) {
await videoPlayerController.initialize();
needsToLoad = false;
}
videoPlayerController.value.isPlaying
? videoPlayerController.pause()
: videoPlayerController.play();
@ -59,34 +55,20 @@ class _VideoControlState extends State<VideoControl> {
@override
Widget build(BuildContext context) {
final shown = !context.watch<SettingsService>().lowBandwidthMode ||
_shownVideos.contains(widget.videoUrl);
final placeHolderBox = SizedBox(
width: widget.width,
height: widget.height,
child: const Card(
color: Colors.black12,
shape: RoundedRectangleBorder(),
child: Icon(Icons.movie)),
);
if (!shown) {
return GestureDetector(
onTap: showVideo,
child: placeHolderBox,
);
}
_shownVideos.add(widget.videoUrl);
if (!videoPlayerController.value.isInitialized) {
return placeHolderBox;
}
final size = videoPlayerController.value.size;
final videoWidth = size.width <= widget.width ? size.width : widget.width;
final videoHeight = size.width <= widget.width
? size.height
: size.height * videoWidth / size.width;
late final double videoWidth;
late final double videoHeight;
if (needsToLoad) {
videoWidth = widget.width;
videoHeight = widget.height;
} else {
final horizontalScale = widget.width / size.width;
final verticalScale = widget.height / size.height;
final scaling = min(horizontalScale, verticalScale);
videoWidth = scaling * size.width;
videoHeight = scaling * size.height;
}
print('Video Width: $videoWidth, Video Height: $videoHeight');
return GestureDetector(
onTap: toggleVideoPlay,
child: Column(
@ -95,10 +77,14 @@ class _VideoControlState extends State<VideoControl> {
SizedBox(
width: videoWidth,
height: videoHeight,
child: AspectRatio(
aspectRatio: videoPlayerController.value.aspectRatio,
child: VideoPlayer(videoPlayerController),
),
child: needsToLoad
? Container(
color: Colors.black,
)
: AspectRatio(
aspectRatio: videoPlayerController.value.aspectRatio,
child: VideoPlayer(videoPlayerController),
),
),
Row(
children: [

Wyświetl plik

@ -1,13 +1,10 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import '../globals.dart';
import '../models/attachment_media_type_enum.dart';
import '../models/media_attachment.dart';
import '../screens/image_viewer_screen.dart';
import '../utils/snackbar_builder.dart';
import 'audio_video/av_control.dart';
import 'image_control.dart';
import 'video_control.dart';
class MediaAttachmentViewerControl extends StatefulWidget {
final List<MediaAttachment> attachments;
@ -32,54 +29,12 @@ class _MediaAttachmentViewerControlState
const width = 250.0;
const height = 250.0;
if (item.explicitType == AttachmentMediaType.video) {
if (useVideoPlayer) {
return VideoControl(
videoUrl: item.uri.toString(),
width: width,
height: height,
);
}
return GestureDetector(
onTap: () async {
final confirm = await showYesNoDialog(
context, 'Open Video Link in external app? ${item.uri}');
if (confirm != true) {
return;
}
if (await canLaunchUrl(item.uri)) {
if (mounted) {
buildSnackbar(
context,
'Attempting to launch video: ${item.uri}',
);
}
await launchUrl(item.uri);
} else {
if (mounted) {
buildSnackbar(context, 'Unable to launch video: ${item.uri}');
}
}
},
child: SizedBox(
height: height,
width: width,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
item.description.isNotEmpty
? item.description
: 'Video: ${item.uri}',
softWrap: true,
),
),
),
],
),
));
return AVControl(
videoUrl: item.uri.toString(),
width: width,
height: height,
description: item.description,
);
}
if (item.explicitType != AttachmentMediaType.image) {
return Text('${item.explicitType}: ${item.uri}');

Wyświetl plik

@ -155,7 +155,7 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> {
return const SizedBox();
}
return SizedBox(
height: 250.0,
height: 300.0,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {

Wyświetl plik

@ -15,9 +15,7 @@ final platformHasCamera = Platform.isIOS || Platform.isAndroid;
final useImagePicker = kIsWeb || Platform.isAndroid || Platform.isIOS;
final useVideoPlayer = kIsWeb || Platform.isAndroid || Platform.isIOS;
final usePhpDebugging = true;
const usePhpDebugging = true;
Future<bool?> showConfirmDialog(BuildContext context, String caption) {
return showDialog<bool>(

Wyświetl plik

@ -8,6 +8,10 @@ enum AttachmentMediaType {
return AttachmentMediaType.unknown;
}
if (text == 'gif' || text == 'gifv') {
return AttachmentMediaType.image;
}
return AttachmentMediaType.values.firstWhere(
(e) => e.name == text,
orElse: () => unknown,

Wyświetl plik

@ -8,6 +8,8 @@
#include <desktop_window/desktop_window_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
#include <media_kit_video/media_kit_video_plugin.h>
#include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
@ -18,6 +20,12 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
g_autoptr(FlPluginRegistrar) media_kit_video_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitVideoPlugin");
media_kit_video_plugin_register_with_registrar(media_kit_video_registrar);
g_autoptr(FlPluginRegistrar) objectbox_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ObjectboxFlutterLibsPlugin");
objectbox_flutter_libs_plugin_register_with_registrar(objectbox_flutter_libs_registrar);

Wyświetl plik

@ -5,11 +5,14 @@
list(APPEND FLUTTER_PLUGIN_LIST
desktop_window
flutter_secure_storage_linux
media_kit_libs_linux
media_kit_video
objectbox_flutter_libs
url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
media_kit_native_event_loop
)
set(PLUGIN_BUNDLED_LIBRARIES)

Wyświetl plik

@ -9,6 +9,8 @@ import desktop_window
import device_info_plus
import flutter_secure_storage_macos
import flutter_web_auth_2
import media_kit_libs_macos_video
import media_kit_video
import objectbox_flutter_libs
import path_provider_foundation
import shared_preferences_foundation
@ -20,6 +22,8 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
ObjectboxFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "ObjectboxFlutterLibsPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))

Wyświetl plik

@ -1,4 +1,4 @@
platform :osx, '10.15'
platform :osx, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

Wyświetl plik

@ -11,10 +11,16 @@ PODS:
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- ObjectBox (1.8.1-rc)
- media_kit_libs_macos_video (1.0.0):
- FlutterMacOS
- media_kit_native_event_loop (1.0.0):
- FlutterMacOS
- media_kit_video (0.0.1):
- FlutterMacOS
- ObjectBox (1.8.1)
- objectbox_flutter_libs (0.0.1):
- FlutterMacOS
- ObjectBox (= 1.8.1-rc)
- ObjectBox (= 1.8.1)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
@ -33,6 +39,9 @@ DEPENDENCIES:
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- media_kit_libs_macos_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos`)
- media_kit_native_event_loop (from `Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos`)
- media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`)
- objectbox_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
@ -55,6 +64,12 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos
FlutterMacOS:
:path: Flutter/ephemeral
media_kit_libs_macos_video:
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos
media_kit_native_event_loop:
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos
media_kit_video:
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos
objectbox_flutter_libs:
:path: Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos
path_provider_foundation:
@ -69,17 +84,20 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
desktop_window: fb7c4f12c1129f947ac482296b6f14059d57a3c3
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
flutter_secure_storage_macos: 75c8cadfdba05ca007c0fa4ea0c16e5cf85e521b
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
flutter_web_auth_2: 6695649132b6c71ea17700703761c0d18fdb8cf6
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
ObjectBox: 7615cc462f2976cb45127d301a17cb473edf3f9e
objectbox_flutter_libs: 6c6e858d1df4a7cd5cb664c2108e6fa0b412be38
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
media_kit_libs_macos_video: d8f5b02cc1ab6f26dc3880e8367fd8ccaea73751
media_kit_native_event_loop: db47f732bacd877aaaf78c38c4fa8cdd7127db3f
media_kit_video: 4e7996581172a6b1dfae7deda317c4036d0c458c
ObjectBox: a7900d5335218cd437cbc080b7ccc38a5211f7b4
objectbox_flutter_libs: f89ab4878f0f764a49077cfaa59030be69ae1d7e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
url_launcher_macos: c04e4fa86382d4f94f6b38f14625708be3ae52e2
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0
PODFILE CHECKSUM: 8d40c19d3cbdb380d870685c3a564c989f1efa52
COCOAPODS: 1.11.3
COCOAPODS: 1.12.0

Wyświetl plik

@ -407,7 +407,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@ -436,7 +436,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
@ -497,7 +497,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@ -545,7 +545,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@ -574,7 +574,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@ -602,7 +602,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};

Wyświetl plik

@ -665,6 +665,62 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.2.0"
media_kit:
dependency: "direct main"
description:
name: media_kit
sha256: "6b1e851865c2da3d84e93e8132ee0add32f604bf7fc211d019db9101a44c8608"
url: "https://pub.dev"
source: hosted
version: "0.0.3+3"
media_kit_libs_ios_video:
dependency: "direct main"
description:
name: media_kit_libs_ios_video
sha256: "495d6e2db9b325aebda16dad3c5ae6593a9dfa37ebe08360b4765a43fa09a3b0"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
media_kit_libs_linux:
dependency: "direct main"
description:
name: media_kit_libs_linux
sha256: "7310b17dd2abc2e7363f78a273086445c2216c7b6dfb60933ca3814031d03814"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
media_kit_libs_macos_video:
dependency: "direct main"
description:
name: media_kit_libs_macos_video
sha256: ff06adff5f544b11aa1d3ad596f9add477264c6026a60aebeed69eda1c7d9d63
url: "https://pub.dev"
source: hosted
version: "1.0.2"
media_kit_libs_windows_video:
dependency: "direct main"
description:
name: media_kit_libs_windows_video
sha256: c2bcbe31e6e6f1e6ae5813c5fe9b7bfde1110c2e95643869919972a7845948e1
url: "https://pub.dev"
source: hosted
version: "1.0.1"
media_kit_native_event_loop:
dependency: "direct main"
description:
name: media_kit_native_event_loop
sha256: "677ea41d13a2013ca7fe050674eac3b5d891185d4300779727a5860a85cdda60"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
media_kit_video:
dependency: "direct main"
description:
name: media_kit_video
sha256: "1a870a3d731a9ce34e12ec5baed05b3081164f0c85b71baf05900ca47ee5639c"
url: "https://pub.dev"
source: hosted
version: "0.0.4"
meta:
dependency: transitive
description:
@ -905,6 +961,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.27.7"
safe_local_storage:
dependency: transitive
description:
name: safe_local_storage
sha256: ede4eb6cb7d88a116b3d3bf1df70790b9e2038bc37cb19112e381217c74d9440
url: "https://pub.dev"
source: hosted
version: "1.0.2"
scrollable_positioned_list:
dependency: "direct main"
description:
@ -1118,6 +1182,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
uri_parser:
dependency: transitive
description:
name: uri_parser
sha256: "6543c9fd86d2862fac55d800a43e67c0dcd1a41677cb69c2f8edfe73bbcf1835"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
url_launcher:
dependency: "direct main"
description:
@ -1288,4 +1360,4 @@ packages:
version: "3.1.1"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.7.0-0"
flutter: ">=3.7.0"

Wyświetl plik

@ -2,7 +2,7 @@ name: relatica
description: A mobile and desktop client for interacting with the Friendica social network
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.3.0+1
version: 0.4.0+1
environment:
sdk: '>=2.18.2 <3.0.0'
@ -30,6 +30,13 @@ dependencies:
image_picker: ^0.8.6
logging: ^1.1.0
markdown: ^7.0.1
media_kit: ^0.0.3
media_kit_libs_ios_video: ^1.0.2
media_kit_libs_linux: ^1.0.1
media_kit_libs_macos_video: ^1.0.2
media_kit_libs_windows_video: ^1.0.1
media_kit_native_event_loop: ^1.0.2
media_kit_video: ^0.0.4
metadata_fetch: ^0.4.1
multi_trigger_autocomplete: ^0.1.1
network_to_file_image: ^4.0.1

Wyświetl plik

@ -8,6 +8,7 @@
#include <desktop_window/desktop_window_plugin.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <media_kit_video/media_kit_video_plugin_c_api.h>
#include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
@ -16,6 +17,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("DesktopWindowPlugin"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
MediaKitVideoPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi"));
ObjectboxFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ObjectboxFlutterLibsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(

Wyświetl plik

@ -5,11 +5,14 @@
list(APPEND FLUTTER_PLUGIN_LIST
desktop_window
flutter_secure_storage_windows
media_kit_video
objectbox_flutter_libs
url_launcher_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
media_kit_libs_windows_video
media_kit_native_event_loop
)
set(PLUGIN_BUNDLED_LIBRARIES)