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 .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ runs:
working-directory: ${{ inputs.working_directory }}
shell: bash
run: |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
PANA=$(pana . --no-warning --project-root "${{ github.workspace }}"); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "Score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0];
if (( $SCORE < ${{inputs.min_score}} )); then echo "The minimum score of ${{inputs.min_score}} was not met!"; exit 1; fi
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ command:
photo_manager: ^3.2.0
photo_view: ^0.15.0
provider: ^6.0.5
rate_limiter: ^1.0.0
rate_limiter: ^1.1.1
record: ">=5.2.0 <7.0.0"
responsive_builder: ^0.7.0
rxdart: ^0.28.0
Expand Down
10 changes: 10 additions & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Upcoming

🔄 Changed

- Raised the minimum `rate_limiter` version to `^1.1.1`.

🐞 Fixed

- Fixed `StreamChatClient.sync` letting a failure from its final `updateLastSyncAt` write escape to the caller; it is now handled by the method's own error handling, like every other sync failure.

## 9.27.0

✅ Added
Expand Down
17 changes: 14 additions & 3 deletions packages/stream_chat/lib/src/client/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ class StreamChatClient {
}

final updatedSyncAt = events.lastOrNull?.createdAt ?? DateTime.now();
return chatPersistenceClient?.updateLastSyncAt(updatedSyncAt);
return await chatPersistenceClient?.updateLastSyncAt(updatedSyncAt);
} catch (error, stk) {
// If we got a 400 error, it means that either the sync time is too
// old or the channel list is too long or too many events need to be
Expand All @@ -647,8 +647,19 @@ class StreamChatClient {
'Resetting the persistence client to enable a fresh start.',
);

await chatPersistenceClient?.flush();
return chatPersistenceClient?.updateLastSyncAt(DateTime.now());
try {
await chatPersistenceClient?.flush();
return await chatPersistenceClient?.updateLastSyncAt(
DateTime.now(),
);
} catch (resetError, resetStk) {
logger.warning(
'Error resetting the persistence client',
resetError,
resetStk,
);
return;
}
}

logger.warning('Error syncing events', error, stk);
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
logging: ^1.2.0
meta: ^1.9.1
mime: ^2.0.0
rate_limiter: ^1.0.0
rate_limiter: ^1.1.1
rxdart: ^0.28.0
synchronized: ^3.1.0+1
uuid: ^4.4.0
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Upcoming

🔄 Changed

- Raised the minimum `rate_limiter` version to `^1.1.1`.

## 9.27.0

✅ Added
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
path_provider: ^2.1.3
photo_manager: ^3.2.0
photo_view: ^0.15.0
rate_limiter: ^1.0.0
rate_limiter: ^1.1.1
record: ">=5.2.0 <7.0.0"
rxdart: ^0.28.0
share_plus: ">=11.0.0 <13.0.0"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,24 @@ void main() {
});

Future<Object?> enrichUrlFrom(WidgetTester tester, String text) async {
// Enrichment runs behind a real-clock debounce, so drive the flow with
// real timers via runAsync.
await tester.runAsync(() async {
await tester.pumpWidget(
MaterialApp(
home: StreamChat(
client: client,
connectivityStream: Stream.value([ConnectivityResult.mobile]),
child: StreamChannel(
channel: channel,
child: const Scaffold(body: StreamMessageInput()),
),
await tester.pumpWidget(
MaterialApp(
home: StreamChat(
client: client,
connectivityStream: Stream.value([ConnectivityResult.mobile]),
child: StreamChannel(
channel: channel,
child: const Scaffold(body: StreamMessageInput()),
),
),
);
await tester.pumpAndSettle();
),
);
await tester.pumpAndSettle();

await tester.enterText(find.byType(TextField), text);
await Future<void>.delayed(const Duration(milliseconds: 500));
await tester.pumpAndSettle();
});
await tester.enterText(find.byType(TextField), text);
// Enrichment runs behind a 350ms debounce; advance past it.
await tester.pump(const Duration(milliseconds: 500));
await tester.pumpAndSettle();

return verify(() => client.enrichUrl(captureAny())).captured.single;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 0 additions & 28 deletions packages/stream_chat_flutter_core/example/analysis_options.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions packages/stream_chat_flutter_core/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class StreamExample extends StatelessWidget {
/// If you'd prefer using pre-made UI widgets for your app, please see our
/// other package, `stream_chat_flutter`.
const StreamExample({
Key? key,
super.key,
required this.client,
}) : super(key: key);
});

/// Instance of Stream Client.
/// Stream's [StreamChatClient] can be used to connect to our servers and
Expand All @@ -51,7 +51,7 @@ class StreamExample extends StatelessWidget {
@override
Widget build(BuildContext context) => MaterialApp(
title: 'Stream Chat Core Example',
home: HomeScreen(),
home: const HomeScreen(),
builder: (context, child) => StreamChatCore(
client: client,
child: child!,
Expand All @@ -67,7 +67,7 @@ class StreamExample extends StatelessWidget {
class HomeScreen extends StatefulWidget {
/// Builds a basic layout displaying a list of [Channel]s the user is a
/// part of.
const HomeScreen({Key? key}) : super(key: key);
const HomeScreen({super.key});

@override
State<HomeScreen> createState() => _HomeScreenState();
Expand Down Expand Up @@ -134,7 +134,7 @@ class _HomeScreenState extends State<HomeScreen> {
child: Text(error.message),
);
}
return CircularProgressIndicator();
return const CircularProgressIndicator();
}

final _item = channels[index];
Expand Down Expand Up @@ -198,7 +198,7 @@ class _HomeScreenState extends State<HomeScreen> {
/// callbacks for building UIs based on different api results.
class MessageScreen extends StatefulWidget {
/// Build a MessageScreen
const MessageScreen({Key? key}) : super(key: key);
const MessageScreen({super.key});

@override
_MessageScreenState createState() => _MessageScreenState();
Expand Down
10 changes: 10 additions & 0 deletions sample_app/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
include: ../analysis_options.yaml

analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

linter:
rules:
cascade_invocations: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
2 changes: 1 addition & 1 deletion sample_app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
id "com.google.gms.google-services" version "4.4.3" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "2.1.20" apply false
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
}

include ":app"
Loading