这是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: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.32.8"
"flutter": "3.35.2"
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.32.8",
"dart.flutterSdkPath": ".fvm/versions/3.35.2",
"editor.formatOnSave": true,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/theme_data_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ThemeData themeData(Ref ref, Brightness brightness) {
backgroundColor: colors.accent,
),
sliderTheme: const SliderThemeData(
showValueIndicator: ShowValueIndicator.always,
showValueIndicator: ShowValueIndicator.onDrag,
// Opting into the new appearance.
// ignore: deprecated_member_use
year2023: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/theme_data_provider.g.dart

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

87 changes: 49 additions & 38 deletions lib/view/dialog/account_select_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,48 +40,59 @@ class AccountSelectDialog extends HookConsumerWidget {
return AlertDialog(
title: Text(t.misskey.selectAccount),
scrollable: true,
content: Column(
children: [
ListTile(
leading: const Icon(Icons.add),
title: Text(t.misskey.addAccount),
trailing: const Icon(Icons.navigate_next),
onTap: () => context.push('/login'),
),
...accounts.map(
(acct) => RadioListTile(
title: Text(acct.toString()),
value: acct,
groupValue: account.value,
onChanged: (value) => account.value = value,
content: RadioGroup<(Account?,)>(
groupValue: switch (account.value) {
Account(isGuest: true) => (null,),
Account(isGuest: false) => (account.value,),
null => null,
},
onChanged: (value) {
if (value != null) {
if (value.$1 != null) {
account.value = value.$1;
} else {
account.value = Account(host: controller.text);
}
}
},
child: Column(
children: [
ListTile(
leading: const Icon(Icons.add),
title: Text(t.misskey.addAccount),
trailing: const Icon(Icons.navigate_next),
onTap: () => context.push('/login'),
),
),
RadioListTile(
title: Text(t.aria.guest),
value: true,
groupValue: account.value?.isGuest ?? false,
onChanged: (value) =>
account.value = Account(host: controller.text),
),
if (account.value?.isGuest ?? false) ...[
MisskeyServerAutocomplete(
controller: controller,
focusNode: focusNode,
...accounts.map(
(account) => RadioListTile<(Account?,)>(
title: Text(account.toString()),
value: (account,),
),
),
TextButton(
onPressed: () async {
final host = await showDialog<String>(
context: context,
builder: (context) => const MisskeyServerListDialog(),
);
if (host != null) {
controller.text = host;
}
},
child: Text(t.aria.findServer),
RadioListTile<(Account?,)>(
title: Text(t.aria.guest),
value: (null,),
),
if (account.value?.isGuest ?? false) ...[
MisskeyServerAutocomplete(
controller: controller,
focusNode: focusNode,
),
TextButton(
onPressed: () async {
final host = await showDialog<String>(
context: context,
builder: (context) => const MisskeyServerListDialog(),
);
if (host != null) {
controller.text = host;
}
},
child: Text(t.aria.findServer),
),
],
],
],
),
),
actions: [
ElevatedButton(
Expand Down
2 changes: 1 addition & 1 deletion lib/view/dialog/mute_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MuteDialog extends HookConsumerWidget {
),
)
.toList(),
value: period.value,
initialValue: period.value,
onChanged: (v) {
if (v != null) {
period.value = v;
Expand Down
30 changes: 16 additions & 14 deletions lib/view/dialog/radio_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,23 @@ class RadioDialog<T> extends HookWidget {
return AlertDialog(
title: title,
scrollable: true,
content: Column(
children: [
if (header case final header?) ...[
header,
const SizedBox(height: 8.0),
],
...values.map(
(value) => RadioListTile(
title: itemBuilder(context, value),
value: value,
groupValue: initialValue,
onChanged: (value) => context.pop(value),
content: RadioGroup(
groupValue: initialValue,
onChanged: (value) => context.pop(value),
child: Column(
children: [
if (header case final header?) ...[
header,
const SizedBox(height: 8.0),
],
...values.map(
(value) => RadioListTile(
title: itemBuilder(context, value),
value: value,
),
),
),
],
],
),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/view/page/play/play_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class PlayEditPage extends HookConsumerWidget {
child: Text(t.misskey.private),
),
],
value: visibility.value,
initialValue: visibility.value,
onChanged: (value) => visibility.value = value,
isExpanded: true,
),
Expand Down
Loading
Loading