fluffychat merge

This commit is contained in:
ggurdin 2026-02-03 12:43:00 -05:00
commit ac1f514849
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
9 changed files with 64 additions and 73 deletions

View file

@ -16,6 +16,22 @@ dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") // For flutter_local_notifications // Workaround for: https://github.com/MaikuB/flutter_local_notifications/issues/2286
}
// Workaround for https://pub.dev/packages/unifiedpush#the-build-fails-because-of-duplicate-classes
configurations.all {
// Use the latest version published: https://central.sonatype.com/artifact/com.google.crypto.tink/tink-android
val tink = "com.google.crypto.tink:tink-android:1.17.0"
// You can also use the library declaration catalog
// val tink = libs.google.tink
resolutionStrategy {
force(tink)
dependencySubstitution {
substitute(module("com.google.crypto.tink:tink")).using(module(tink))
}
}
}
android {
namespace = "com.talktolearn.chat"
compileSdk = flutter.compileSdkVersion

View file

@ -171,20 +171,6 @@
</intent-filter>
</service>
<receiver android:name="org.unifiedpush.flutter.connector.UnifiedPushReceiver"
tools:replace="android:enabled"
android:enabled="false">
</receiver>
<receiver android:exported="false" android:enabled="true" android:name=".UnifiedPushReceiver">
<intent-filter>
<action android:name="org.unifiedpush.flutter.connector.MESSAGE"/>
<action android:name="org.unifiedpush.flutter.connector.UNREGISTERED"/>
<action android:name="org.unifiedpush.flutter.connector.NEW_ENDPOINT"/>
<action android:name="org.unifiedpush.flutter.connector.REGISTRATION_FAILED" />
</intent-filter>
</receiver>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data

View file

@ -1,23 +0,0 @@
package chat.fluffy.fluffychat
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.dart.DartExecutor
import org.unifiedpush.flutter.connector.UnifiedPushReceiver
import android.content.Context
class UnifiedPushReceiver : UnifiedPushReceiver() {
override fun getEngine(context: Context): FlutterEngine {
var engine = MainActivity.engine
if (engine == null) {
engine = MainActivity.provideEngine(context)
engine.localizationPlugin.sendLocalesToFlutter(
context.resources.configuration
)
engine.dartExecutor.executeDartEntrypoint(
DartExecutor.DartEntrypoint.createDefault()
)
}
return engine
}
}

View file

@ -299,7 +299,9 @@ class MyCallingPage extends State<Calling> {
L10n.of(widget.context).foregroundServiceRunning,
),
iosNotificationOptions: const IOSNotificationOptions(),
foregroundTaskOptions: const ForegroundTaskOptions(),
foregroundTaskOptions: ForegroundTaskOptions(
eventAction: ForegroundTaskEventAction.nothing(),
),
);
FlutterForegroundTask.startService(
notificationTitle: L10n.of(widget.context).screenSharingTitle,

View file

@ -290,9 +290,9 @@ class EmotesSettingsController extends State<EmotesSettings> {
if (result.isEmpty) return null;
final buffer = InputStream(await result.first.readAsBytes());
final buffer = InputMemoryStream(await result.first.readAsBytes());
final archive = ZipDecoder().decodeBuffer(buffer);
final archive = ZipDecoder().decodeStream(buffer);
return archive;
},
@ -342,8 +342,6 @@ class EmotesSettingsController extends State<EmotesSettings> {
'${pack.pack.displayName ?? client.userID?.localpart ?? 'emotes'}.zip';
final output = ZipEncoder().encode(archive);
if (output == null) return;
MatrixFile(
name: fileName,
bytes: Uint8List.fromList(output),

View file

@ -135,7 +135,7 @@ class BackgroundPush {
if (Platform.isAndroid) {
await UnifiedPush.initialize(
onNewEndpoint: _newUpEndpoint,
onRegistrationFailed: _upUnregistered,
onRegistrationFailed: (_, i) => _upUnregistered(i),
onUnregistered: _upUnregistered,
onMessage: _onUpMessage,
);
@ -519,7 +519,8 @@ class BackgroundPush {
.registerAppWithDialog();
}
Future<void> _newUpEndpoint(String newEndpoint, String i) async {
Future<void> _newUpEndpoint(PushEndpoint newPushEndpoint, String i) async {
final newEndpoint = newPushEndpoint.url;
upAction = true;
if (newEndpoint.isEmpty) {
await _upUnregistered(i);
@ -579,7 +580,8 @@ class BackgroundPush {
}
}
Future<void> _onUpMessage(Uint8List message, String i) async {
Future<void> _onUpMessage(PushMessage pushMessage, String i) async {
final message = pushMessage.content;
upAction = true;
final data = Map<String, dynamic>.from(
json.decode(utf8.decode(message))['notification'],
@ -613,7 +615,7 @@ class UPFunctions extends UnifiedPushFunctions {
@override
Future<void> registerApp(String instance) async {
await UnifiedPush.registerApp(instance, features);
await UnifiedPush.register(instance: instance, features: features);
}
@override

View file

@ -101,10 +101,10 @@ packages:
dependency: "direct main"
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
url: "https://pub.dev"
source: hosted
version: "3.6.1"
version: "4.0.7"
args:
dependency: transitive
description:
@ -501,10 +501,10 @@ packages:
dependency: "direct main"
description:
name: dynamic_color
sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d
sha256: "43a5a6679649a7731ab860334a5812f2067c2d9ce6452cf069c5e0c25336c17c"
url: "https://pub.dev"
source: hosted
version: "1.7.0"
version: "1.8.1"
emoji_picker_flutter:
dependency: "direct main"
description:
@ -540,10 +540,11 @@ packages:
excel:
dependency: "direct main"
description:
name: excel
sha256: "1a15327dcad260d5db21d1f6e04f04838109b39a2f6a84ea486ceda36e468780"
url: "https://pub.dev"
source: hosted
path: "."
ref: efd70f3086d12105dad0029f71663e6a4ed295f2
resolved-ref: efd70f3086d12105dad0029f71663e6a4ed295f2
url: "https://github.com/busslina/excel.git"
source: git
version: "4.0.6"
fake_async:
dependency: transitive
@ -758,10 +759,10 @@ packages:
dependency: "direct main"
description:
name: flutter_foreground_task
sha256: "6cf10a27f5e344cd2ecad0752d3a5f4ec32846d82fda8753b3fe2480ebb832a3"
sha256: "9f1b25a81db95d7119d2c5cffc654048cbdd49d4056183e1beadc1a6a38f3e29"
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "9.1.0"
flutter_highlighter:
dependency: "direct main"
description:
@ -1269,10 +1270,10 @@ packages:
dependency: "direct main"
description:
name: image
sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d
sha256: "492bd52f6c4fbb6ee41f781ff27765ce5f627910e1e0cbecfa3d9add5562604c"
url: "https://pub.dev"
source: hosted
version: "4.3.0"
version: "4.7.2"
image_picker:
dependency: "direct main"
description:
@ -1935,6 +1936,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.5.1"
posix:
dependency: transitive
description:
name: posix
sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61"
url: "https://pub.dev"
source: hosted
version: "6.0.3"
pretty_qr_code:
dependency: "direct main"
description:
@ -2568,26 +2577,26 @@ packages:
dependency: "direct main"
description:
name: unifiedpush
sha256: "6dbed5a6305ca33f1865c7a3d814ae39476b79a2d23ca76a5708f023f405730f"
sha256: "1418375efb580af9640de4eaf4209cb6481f9a48792648ced3051f30e67d9568"
url: "https://pub.dev"
source: hosted
version: "5.0.2"
version: "6.0.2"
unifiedpush_android:
dependency: transitive
description:
name: unifiedpush_android
sha256: "7443dece0a850ae956514f809983eb2b39fc518c2c7d24dbfe817198bec89134"
sha256: "2f25db8eb2fc3183bf2e43db89fff20b2587adc1c361e1d1e06b223a0d45b50a"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "3.1.1"
unifiedpush_platform_interface:
dependency: transitive
description:
name: unifiedpush_platform_interface
sha256: dd588d78a8b2bfc10430e30035526e98caa543d0b7364a6344b5eb4815721c6d
sha256: bb49d2748211520e35e0374ab816faa8a2c635267e71909d334ad868d532eba5
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "3.0.1"
unifiedpush_ui:
dependency: "direct main"
description:

View file

@ -14,7 +14,7 @@ environment:
dependencies:
animations: ^2.0.11
app_links: ^6.3.3
archive: ^3.4.10
archive: ^4.0.7
async: ^2.11.0
badges: ^3.1.2
blurhash_dart: ^1.2.1
@ -29,14 +29,14 @@ dependencies:
desktop_notifications: ^0.6.3
device_info_plus: ^11.5.0
diacritic: ^0.1.6
dynamic_color: ^1.7.0
dynamic_color: ^1.8.1
emoji_picker_flutter: ^4.3.0
emojis: ^0.9.9
file_picker: ^10.2.1
file_selector: ^1.0.3
flutter:
sdk: flutter
flutter_foreground_task: ^6.1.3
flutter_foreground_task: ^9.1.0
flutter_highlighter: ^0.1.1
flutter_linkify: ^6.0.0
flutter_local_notifications: ^19.4.0
@ -94,7 +94,7 @@ dependencies:
sqlcipher_flutter_libs: ^0.6.7
swipe_to_action: ^0.3.0
tor_detector_web: ^1.1.0
unifiedpush: ^5.0.1
unifiedpush: ^6.0.2
unifiedpush_ui: ^0.1.0
universal_html: ^2.2.4
url_launcher: ^6.3.2
@ -111,7 +111,11 @@ dependencies:
country_picker: ^2.0.25
csv: ^6.0.0
dropdown_button2: ^2.3.9
excel: ^4.0.6
# https://github.com/justkawal/excel/pull/409
excel:
git:
url: https://github.com/busslina/excel.git
ref: efd70f3086d12105dad0029f71663e6a4ed295f2
firebase_analytics: ^11.0.1
firebase_core: ^3.1.0
firebase_messaging: ^15.1.5

View file

@ -1,7 +1,7 @@
name: fluffychat
title: FluffyChat
base: core24
adopt-info: fluffychat
version: 2.0.0
license: AGPL-3.0
summary: The cutest messenger in the Matrix network
description: |
@ -82,8 +82,6 @@ parts:
# Workaround for Flutter build error:
rm -rf build
craftctl set version="$(yq e '.version' pubspec.yaml | sed 's/\(.*\)+.*/\1/')"
flutter build linux --release -v
mkdir -p $CRAFT_PART_INSTALL/bin/
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/
@ -95,7 +93,6 @@ parts:
- libpciaccess-dev
build-snaps:
- rustup
- yq
stage-packages:
- libsecret-1-0
- libjsoncpp25