Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

いくつかの修正など #693

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: リノート時に「ログインなし」を選べてしまうのを修正
4ster1sk committed Nov 22, 2024
commit d28fb1caa4894162f816a4d35079e108e84709e7
13 changes: 10 additions & 3 deletions lib/router/app_router.gr.dart

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

12 changes: 10 additions & 2 deletions lib/view/common/account_select_dialog.dart
Original file line number Diff line number Diff line change
@@ -11,14 +11,22 @@ import "package:miria/view/common/misskey_notes/mfm_text.dart";

@RoutePage<Account>()
class AccountSelectDialog extends HookConsumerWidget {
const AccountSelectDialog({super.key, this.host, this.remoteHost});
const AccountSelectDialog({
super.key,
this.host,
this.remoteHost,
this.showWithoutLogin = true,
});

/// nullではないとき, 指定されたサーバーのアカウントのみ表示する
final String? host;

/// 相手先のホスト
final String? remoteHost;

// 相手先のサーバで開く(ログインなし)を表示
final bool showWithoutLogin;

@override
Widget build(BuildContext context, WidgetRef ref) {
final accounts = ref.watch(accountsProvider);
@@ -41,7 +49,7 @@ class AccountSelectDialog extends HookConsumerWidget {
height: MediaQuery.of(context).size.height * 0.8,
child: ListView(
children: [
if (remoteHost != null)
if (showWithoutLogin && remoteHost != null)
switch (navigateAsRemote.value) {
AsyncLoading() => const Center(
child: CircularProgressIndicator.adaptive(),
1 change: 1 addition & 0 deletions lib/view/common/misskey_notes/renote_modal_sheet.dart
Original file line number Diff line number Diff line change
@@ -101,6 +101,7 @@ class RenoteOtherAccountNotifier extends _$RenoteOtherAccountNotifier {
note.user.host != this.account.host && note.user.host != null
? note.user.host
: null,
showWithoutLogin: false,
),
);
if (selectedAccount == null) return;
2 changes: 1 addition & 1 deletion lib/view/common/misskey_notes/renote_modal_sheet.g.dart

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