Merge pull request #2701 from krille-chan/krille/follow-up-43

chore: Introduce tool versions file
This commit is contained in:
Krille-chan 2026-03-13 17:43:05 +01:00 committed by GitHub
commit 4b676cc23b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 69 additions and 20 deletions

View file

@ -14,7 +14,7 @@ jobs:
- run: git diff --exit-code - run: git diff --exit-code
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- name: Check for unused translations - name: Check for unused translations
run: flutter pub run translations_cleaner list-unused-terms -a run: flutter pub run translations_cleaner list-unused-terms -a
@ -52,7 +52,7 @@ jobs:
- uses: ./.github/actions/free_up_space - uses: ./.github/actions/free_up_space
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- uses: moonrepo/setup-rust@v1 - uses: moonrepo/setup-rust@v1
with: with:
@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- uses: moonrepo/setup-rust@v1 - uses: moonrepo/setup-rust@v1
- run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu - run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
@ -104,7 +104,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Install dependencies - name: Install dependencies
run: sudo apt-get update && sudo apt-get install git wget curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libwebkit2gtk-4.1-dev -y run: sudo apt-get update && sudo apt-get install git wget curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libwebkit2gtk-4.1-dev -y
- run: echo "FLUTTER_VERSION=$(yq '.environment.flutter' < pubspec.yaml)" >> $GITHUB_ENV - run: echo "FLUTTER_VERSION=$(yq '.environment.flutter' < .tool_versions.yaml)" >> $GITHUB_ENV
- name: Install Flutter - name: Install Flutter
run: | run: |
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
@ -120,7 +120,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- name: Use Xcode 16.4 - name: Use Xcode 16.4
run: sudo xcode-select --switch /Applications/Xcode_16.4.app run: sudo xcode-select --switch /Applications/Xcode_16.4.app
@ -194,7 +194,7 @@ jobs:
echo "Generated AVD snapshot for caching." echo "Generated AVD snapshot for caching."
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- uses: remarkablemark/setup-maestro-cli@v1 - uses: remarkablemark/setup-maestro-cli@v1
- name: Load integration test env - name: Load integration test env

View file

@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
- uses: moonrepo/setup-rust@v1 - uses: moonrepo/setup-rust@v1
- run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu - run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Prepare web - name: Prepare web
@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1

View file

@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- uses: moonrepo/setup-rust@v1 - uses: moonrepo/setup-rust@v1
- run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu - run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- name: Add Firebase Messaging - name: Add Firebase Messaging
run: | run: |
@ -115,7 +115,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Install dependencies - name: Install dependencies
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libwebkit2gtk-4.1-dev -y run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libwebkit2gtk-4.1-dev -y
- run: echo "FLUTTER_VERSION=$(yq '.environment.flutter' < pubspec.yaml)" >> $GITHUB_ENV - run: echo "FLUTTER_VERSION=$(yq '.environment.flutter' < .tool_versions.yaml)" >> $GITHUB_ENV
- name: Install Flutter - name: Install Flutter
run: | run: |
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
@ -141,7 +141,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version-file: pubspec.yaml flutter-version-file: .tool_versions.yaml
cache: true cache: true
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1

2
.tool_versions.yaml Normal file
View file

@ -0,0 +1,2 @@
environment:
flutter: 3.41.4

View file

@ -2787,5 +2787,7 @@
"fluffyChatSupportBannerMessage": "FluffyChat needs YOUR help!\n❤\nFluffyChat will always be free, but development and hosting still cost money.\nThe future of the project depends on support from people like you.", "fluffyChatSupportBannerMessage": "FluffyChat needs YOUR help!\n❤\nFluffyChat will always be free, but development and hosting still cost money.\nThe future of the project depends on support from people like you.",
"skipSupportingFluffyChat": "Skip supporting FluffyChat", "skipSupportingFluffyChat": "Skip supporting FluffyChat",
"iDoNotWantToSupport": "I do not want to support", "iDoNotWantToSupport": "I do not want to support",
"iAlreadySupportFluffyChat": "I already support FluffyChat" "iAlreadySupportFluffyChat": "I already support FluffyChat",
"setLowPriority": "Set low priority",
"unsetLowPriority": "Unset low priority"
} }

View file

@ -408,10 +408,13 @@ class ChatListController extends State<ChatList>
if (DateTime.now().difference(lastSeenSupportBanner) >= if (DateTime.now().difference(lastSeenSupportBanner) >=
Duration(days: 6 * 7)) { Duration(days: 6 * 7)) {
final theme = Theme.of(context);
final messenger = ScaffoldMessenger.of(context); final messenger = ScaffoldMessenger.of(context);
messenger.showMaterialBanner( messenger.showMaterialBanner(
MaterialBanner( MaterialBanner(
backgroundColor: theme.colorScheme.errorContainer,
leading: CloseButton( leading: CloseButton(
color: theme.colorScheme.onErrorContainer,
onPressed: () async { onPressed: () async {
final okCancelResult = await showOkCancelAlertDialog( final okCancelResult = await showOkCancelAlertDialog(
context: context, context: context,
@ -436,7 +439,10 @@ class ChatListController extends State<ChatList>
), ),
content: Padding( content: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0), padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Text(L10n.of(context).fluffyChatSupportBannerMessage), child: Text(
L10n.of(context).fluffyChatSupportBannerMessage,
style: TextStyle(color: theme.colorScheme.onErrorContainer),
),
), ),
actions: [ actions: [
TextButton( TextButton(
@ -446,7 +452,10 @@ class ChatListController extends State<ChatList>
'https://fluffychat.im/faq/#how_can_i_support_fluffychat', 'https://fluffychat.im/faq/#how_can_i_support_fluffychat',
); );
}, },
child: Text(L10n.of(context).support), child: Text(
L10n.of(context).support,
style: TextStyle(color: theme.colorScheme.onErrorContainer),
),
), ),
], ],
), ),
@ -586,6 +595,25 @@ class ChatListController extends State<ChatList>
], ],
), ),
), ),
PopupMenuItem(
value: ChatContextAction.lowPriority,
child: Row(
mainAxisSize: .min,
children: [
Icon(
room.isLowPriority
? Icons.low_priority
: Icons.low_priority_outlined,
),
const SizedBox(width: 12),
Text(
room.isLowPriority
? L10n.of(context).unsetLowPriority
: L10n.of(context).setLowPriority,
),
],
),
),
if (spacesWithPowerLevels.isNotEmpty) if (spacesWithPowerLevels.isNotEmpty)
PopupMenuItem( PopupMenuItem(
value: ChatContextAction.addToSpace, value: ChatContextAction.addToSpace,
@ -719,6 +747,12 @@ class ChatListController extends State<ChatList>
context: context, context: context,
future: () => space.setSpaceChild(room.id), future: () => space.setSpaceChild(room.id),
); );
case ChatContextAction.lowPriority:
await showFutureLoadingDialog(
context: context,
future: () => room.setLowPriority(!room.isLowPriority),
);
return;
} }
} }
@ -928,6 +962,7 @@ enum ChatContextAction {
open, open,
goToSpace, goToSpace,
favorite, favorite,
lowPriority,
markUnread, markUnread,
mute, mute,
leave, leave,

View file

@ -191,6 +191,17 @@ class ChatListItem extends StatelessWidget {
padding: EdgeInsets.only(left: 4.0), padding: EdgeInsets.only(left: 4.0),
child: Icon(Icons.notifications_off_outlined, size: 16), child: Icon(Icons.notifications_off_outlined, size: 16),
), ),
if (room.isLowPriority)
Padding(
padding: EdgeInsets.only(
right: hasNotifications ? 4.0 : 0.0,
),
child: Icon(
Icons.low_priority,
size: 16,
color: theme.colorScheme.primary,
),
),
if (room.isFavourite) if (room.isFavourite)
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(

View file

@ -1080,10 +1080,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: matrix name: matrix
sha256: c0214ee99a73957d3c02d54a60afcf9acee577b0924749085d6fdf556e8eba42 sha256: "5bb38e98212bc4c3244c762a1af787f7239a38d2cfdf44488258283ff899f77c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.1" version: "6.2.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -2268,4 +2268,4 @@ packages:
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.11.1 <4.0.0" dart: ">=3.11.1 <4.0.0"
flutter: "3.41.4" flutter: ">=3.38.4"

View file

@ -8,7 +8,6 @@ version: 2.4.0+3546
environment: environment:
sdk: ">=3.11.1 <4.0.0" sdk: ">=3.11.1 <4.0.0"
flutter: "3.41.4"
dependencies: dependencies:
archive: ^4.0.7 archive: ^4.0.7
@ -52,7 +51,7 @@ dependencies:
just_audio: ^0.10.5 just_audio: ^0.10.5
latlong2: ^0.9.1 latlong2: ^0.9.1
linkify: ^5.0.0 linkify: ^5.0.0
matrix: ^6.1.1 matrix: ^6.2.0
mime: ^2.0.0 mime: ^2.0.0
native_imaging: ^0.4.0 native_imaging: ^0.4.0
opus_caf_converter_dart: ^1.0.1 opus_caf_converter_dart: ^1.0.1