mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-10-09 02:54:14 +00:00
48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
|
|
|
import '../frb_generated.dart';
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
/// The 1:1 chats a story sent to `audience` would go to right now, one per
|
|
/// contact. Together with the chats picked for a direct send, this is who a
|
|
/// send reaches.
|
|
Future<List<String>> storyAudienceChats({required StoryAudience audience}) =>
|
|
RustLib.instance.api.crateBridgeStoriesStoryAudienceChats(
|
|
audience: audience,
|
|
);
|
|
|
|
/// The most recipients one media send, story rows included, may reach.
|
|
int maxMediaRecipients() =>
|
|
RustLib.instance.api.crateBridgeStoriesMaxMediaRecipients();
|
|
|
|
/// Takes one of the user's own story items down for every recipient.
|
|
Future<void> deleteStoryItem({required String mediaId}) =>
|
|
RustLib.instance.api.crateBridgeStoriesDeleteStoryItem(mediaId: mediaId);
|
|
|
|
/// Lets go of every story item older than 24 hours.
|
|
Future<void> purgeExpiredStories() =>
|
|
RustLib.instance.api.crateBridgeStoriesPurgeExpiredStories();
|
|
|
|
class StoryAudience {
|
|
final bool all;
|
|
final Int64List contactGroupIds;
|
|
|
|
const StoryAudience({
|
|
required this.all,
|
|
required this.contactGroupIds,
|
|
});
|
|
|
|
@override
|
|
int get hashCode => all.hashCode ^ contactGroupIds.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is StoryAudience &&
|
|
runtimeType == other.runtimeType &&
|
|
all == other.all &&
|
|
contactGroupIds == other.contactGroupIds;
|
|
}
|