这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/i18n/aria/aria.i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ addTab: "Add tab"
alwaysExpandCw: "Always expand content warning"
alwaysExpandLongNote: "Always expand long note"
alwaysExpandMediaInSubNote: "Always expand media in sub note"
alwaysShowAllReactions: "Always show all reactions"
alwaysShowTabHeader: "Always show tab info"
authenticate: "Authenticate"
authenticated: "Authenticated"
Expand Down Expand Up @@ -61,6 +62,7 @@ loginWithAccessToken: "Sign in with an access token"
margin: "Margin"
media: "Media"
mentionToRemoteWarning: "This note includes mentions to remote users"
mergeReactionsByName: "Merge reactions with the same name"
moved: "Moved"
muted: "Muted"
mutedEmojis: "Muted emojis"
Expand Down
2 changes: 1 addition & 1 deletion lib/i18n/strings.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 31
/// Strings: 54618 (1761 per locale)
/// Strings: 54620 (1761 per locale)

// coverage:ignore-file
// ignore_for_file: type=lint, unused_import
Expand Down
2 changes: 2 additions & 0 deletions lib/i18n/strings_en_US.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class TranslationsAriaEnUs {
String get alwaysExpandCw => 'Always expand content warning';
String get alwaysExpandLongNote => 'Always expand long note';
String get alwaysExpandMediaInSubNote => 'Always expand media in sub note';
String get alwaysShowAllReactions => 'Always show all reactions';
String get alwaysShowTabHeader => 'Always show tab info';
String get authenticate => 'Authenticate';
String get authenticated => 'Authenticated';
Expand Down Expand Up @@ -129,6 +130,7 @@ class TranslationsAriaEnUs {
String get margin => 'Margin';
String get media => 'Media';
String get mentionToRemoteWarning => 'This note includes mentions to remote users';
String get mergeReactionsByName => 'Merge reactions with the same name';
String get moved => 'Moved';
String get muted => 'Muted';
String get mutedEmojis => 'Muted emojis';
Expand Down
2 changes: 2 additions & 0 deletions lib/model/general_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class GeneralSettings with _$GeneralSettings {
@Default(false) bool alwaysExpandCw,
@Default(false) bool alwaysExpandLongNote,
@Default(false) bool alwaysExpandMediaInSubNote,
@Default(false) bool mergeReactionsByName,
@Default(false) bool alwaysShowAllReactions,
MediaListWithOneImageAppearance? mediaListWithOneImageAppearance,
@Default(BoxFit.contain) BoxFit thumbnailBoxFit,
@Default(EmojiStyle.twemoji) EmojiStyle emojiStyle,
Expand Down
46 changes: 45 additions & 1 deletion lib/model/general_settings.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/model/general_settings.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/provider/general_settings_notifier_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ class GeneralSettingsNotifier extends _$GeneralSettingsNotifier {
await _save();
}

Future<void> setMergeReactionsByName(bool mergeReactionsByName) async {
state = state.copyWith(mergeReactionsByName: mergeReactionsByName);
await _save();
}

Future<void> setAlwaysShowAllReactions(bool alwaysShowAllReactions) async {
state = state.copyWith(alwaysShowAllReactions: alwaysShowAllReactions);
await _save();
}

Future<void> setMediaListWithOneImageAppearance(
MediaListWithOneImageAppearance? mediaListWithOneImageAppearance,
) async {
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/general_settings_notifier_provider.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions lib/view/page/settings/note_display_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,20 @@ class NoteDisplayPage extends HookConsumerWidget {
.read(generalSettingsNotifierProvider.notifier)
.setAlwaysExpandMediaInSubNote(value),
),
SwitchListTile(
title: Text(t.aria.mergeReactionsByName),
value: settings.mergeReactionsByName,
onChanged: (value) => ref
.read(generalSettingsNotifierProvider.notifier)
.setMergeReactionsByName(value),
),
SwitchListTile(
title: Text(t.aria.alwaysShowAllReactions),
value: settings.alwaysShowAllReactions,
onChanged: (value) => ref
.read(generalSettingsNotifierProvider.notifier)
.setAlwaysShowAllReactions(value),
),
ListTile(
title: Text(t.misskey.emojiStyle),
subtitle: Text(
Expand Down
5 changes: 5 additions & 0 deletions lib/view/widget/note_detailed_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ class NoteDetailedWidget extends HookConsumerWidget {
},
),
);
final showAllReactions = ref.watch(
generalSettingsNotifierProvider
.select((settings) => settings.alwaysShowAllReactions),
);
final colors =
ref.watch(misskeyColorsProvider(Theme.of(context).brightness));
final style = DefaultTextStyle.of(context).style;
Expand Down Expand Up @@ -545,6 +549,7 @@ class NoteDetailedWidget extends HookConsumerWidget {
ReactionsViewer(
account: account,
noteId: appearNote.id,
showAllReactions: showAllReactions,
),
NoteFooter(
account: account,
Expand Down
Loading
Loading