From cf900c6c0a84bb694dc44c681afe07b9fe6f8eec Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 14:30:57 +0100 Subject: [PATCH 01/22] update actions --- .github/workflows/build.yml | 2 +- .github/workflows/build_nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1498a64..bf14a74 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: build on: push: diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 0b3aed4..fdb197a 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -1,4 +1,4 @@ -name: Build +name: Build_nightly on: push: From 056dd4b6acb8cd8ce89225cdff3699c820dfc8a1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 14:54:37 +0100 Subject: [PATCH 02/22] update action name --- .github/workflows/build_nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index fdb197a..0edc764 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -1,4 +1,4 @@ -name: Build_nightly +name: build_nightly on: push: From b7169748afa2786a74fc40b2c7ad7dd8c28bcbff Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:27:08 +0100 Subject: [PATCH 03/22] autocancel redundant builds --- .github/workflows/build.yml | 6 ++++++ .github/workflows/build_nightly.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf14a74..3b9c9fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,12 @@ defaults: working-directory: stream_chat_v1 jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" build_and_deploy_android: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 0edc764..59bde38 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -10,6 +10,12 @@ defaults: working-directory: stream_chat_v1 jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" build_and_deploy_ios: runs-on: [macos-latest] steps: From f63a68a494faba4afccdb59739678c0c9889bbad Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 4 Mar 2021 19:32:17 +0530 Subject: [PATCH 04/22] [SampleApp] Add `debug` signingConfigs (#16) --- stream_chat_v1/android/app/build.gradle | 9 +++++++++ stream_chat_v1/android/app/debug.keystore | Bin 0 -> 2105 bytes 2 files changed, 9 insertions(+) create mode 100644 stream_chat_v1/android/app/debug.keystore diff --git a/stream_chat_v1/android/app/build.gradle b/stream_chat_v1/android/app/build.gradle index 6a55b33..e91ca1b 100644 --- a/stream_chat_v1/android/app/build.gradle +++ b/stream_chat_v1/android/app/build.gradle @@ -47,6 +47,15 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. diff --git a/stream_chat_v1/android/app/debug.keystore b/stream_chat_v1/android/app/debug.keystore new file mode 100644 index 0000000000000000000000000000000000000000..cdfc792b63fa962b13c94ababd37bff37a677354 GIT binary patch literal 2105 zcmbW1Ydq5p8^`yb8JlAfC5)e@D*al4pRw zx2NZYKZ2;f7eY6AP*31cHwYvSpy?1HS{4e|g#r*j2fPIU#6b``WEz+9C@Li^8)M}8 zm{?b`pm^A4(Am+;!`xToR*D-P{It-`b9{&@76aYohdWC8AGkP0m zNX2OVnx@{>QjHV=JaqC?nM)%tsoaBnc8Ne)UQ@Q`*YX%2mWa8tCXH@nN5kO(-3mFP z@%IYoSCDE$HA@E(*uA}?8TVI2tR#G+#C%F`Z_0e`wF;m#W@Pns;Qb`K?eajaQ z57+pg?aPKqJ6?R%=BRSH8)XxOM@AEFhbBX%xQm| z>JlQpi>y)W{E+sXfxu;6J@L^tdKe+ z#`?4f1H&aBbaW+y*wigEi0DUVdwKXY%FMRxhUg9q5OeD&a!0MjFx*6<_hQa3b#AM1 zxohqKuyP`=v-QU0zH48K{cyulacep?_#DyCfcjGn?T6)yO7_ba63*3*>5zQ|m$AV^ z`C5)qW`}PS$mNcWle3#N67EUdGR&dPxCHy@lHz$?^B>Ea#lJOVi8!N9B@a znozDyl-Ai^teD6a|5VeXy zp%BAZkNcquj=)j|y9mBNBL>n*T5(KN)Tj)8rh1v26`Vd5-Rjzym==3F8Og=8pLN@i z1wW-I;&EjQn$t>3k!{b)%{pGewAaw0xl3VO2c#iA5Pli+c(qj`^PC68eyQ$Pi(br9 z3=y0DbK2|$0n6yeo5Qe-#w~A|ChdX`ejes{-5Ps$ifSltQKG`_PMdFZxO4QKwqzwi zicFqG564uPxJ`Ap6d>4vs+1m|x7=a1B>2JddP9mhUgkkRU@4D!_wmcs`UvLb#&J-K zNO>sTdSHh^I%t|THM-#bCOj-W3h*}_&kH#3REYNjs1tEbLT61lc$beCc%kgbx704k zsdGhDn7nRp$|NXY_(z5*3emz9d#Fr%9~LT)WjVZ!8w! z+pWOD-;4B7mM^Aco|JKSPFtN@gcG(4Nw1vWGMg1r~*;krO^QyF*T85}*fm>ium<@$&{I zXtPacPNC`GF*F@$1_Jzh27@t0o1ym^n>ufoGeVpE2Izml|38`zApg7O zro6@IfE;LZ12~ut0HDa*q@6bSL}JGc#yhgiUM^bpxz^jOJTTxLEO^~|sCw9tKf90~ zsxdG*=rjye(d#+(_5om8n1eO0>DZ$ULOSH9H781Amdj@})N z`%^_V#nnp8kk#qZ@L{K(LWoUK#_Z%{)EWPSyV}o+Su*CYkd_1c3I6H$@Q^ept8;ieYZ?;X{|wcLXp zC(F*BN~QrtThp5wbk4&(7^Hg45fvJuAYOOdmz5M1ZhwO)SCMJ){RB2d-dPWfggrM& z>&YUyr*^Y?#;Y6iP|$&;KKNBp7&(J!4Dagq2|=`-JQUfNyA0BXhlM2Sdt1kFmxKSX l(9lMG;rd4yhX&iG*Lg|sXum9Y^S!PY%4kv}X?@nE{|5I{xpM#j literal 0 HcmV?d00001 From 11acc1ffe45990004c860dbde64718c2cfae482c Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 4 Mar 2021 15:18:06 +0100 Subject: [PATCH 05/22] merge develop --- .../ios/Runner.xcodeproj/project.pbxproj | 2 ++ stream_chat_v1/lib/choose_user_page.dart | 16 +++++++--------- stream_chat_v1/lib/main.dart | 8 +++++--- stream_chat_v1/web/manifest.json | 6 +++--- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj index 6bb0a1f..61504aa 100644 --- a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj +++ b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj @@ -314,6 +314,7 @@ "${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework", "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", + "${PODS_ROOT}/../Flutter/Flutter.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework", "${BUILT_PRODUCTS_DIR}/esys_flutter_share/esys_flutter_share.framework", @@ -344,6 +345,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/esys_flutter_share.framework", diff --git a/stream_chat_v1/lib/choose_user_page.dart b/stream_chat_v1/lib/choose_user_page.dart index d325a96..a7c9eac 100644 --- a/stream_chat_v1/lib/choose_user_page.dart +++ b/stream_chat_v1/lib/choose_user_page.dart @@ -22,7 +22,7 @@ class ChooseUserPage extends StatelessWidget { extraData: { 'name': 'Salvatore Giordano', 'image': - 'https://ca.slack-edge.com/T02RM6X6B-USKK9FFRT-30c415e207a9-512', + 'https://avatars.githubusercontent.com/u/20601437?s=460&u=3f66c22a7483980624804054ae7f357cf102c784&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoic2FoaWwifQ.WnIUoB5gR2kcAsFhiDvkiD6zdHXZ-VSU2aQWWkhsvfo': @@ -31,7 +31,7 @@ class ChooseUserPage extends StatelessWidget { extraData: { 'name': 'Sahil Kumar', 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U01EYU51M89-bbc152b40321-512', + 'https://avatars.githubusercontent.com/u/25670178?s=400&u=30ded3784d8d2310c5748f263fd5e6433c119aa1&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiYmVuIn0.nAz2sNFGQwY7rl2Og2z3TGHUsdpnN53tOsUglJFvLmg': @@ -39,8 +39,7 @@ class ChooseUserPage extends StatelessWidget { id: 'ben', extraData: { 'name': 'Ben Golden', - 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U01AXAF23MG-f57403a3cb0d-512', + 'image': 'https://avatars.githubusercontent.com/u/1581974?s=400&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidGhpZXJyeSJ9.lEq6TrZtHzjoNtf7HHRufUPyGo_pa8vg4_XhEBp4ckY': @@ -49,7 +48,7 @@ class ChooseUserPage extends StatelessWidget { extraData: { 'name': 'Thierry Schellenbach', 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U02RM6X6D-g28a1278a98e-512', + 'https://avatars.githubusercontent.com/u/265409?s=400&u=2d0e3bb1820db992066196bff7b004f0eee8e28d&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidG9tbWFzbyJ9.GLSI0ESshERMo2WjUpysD709NEtn1zmGimUN2an7g9o': @@ -57,8 +56,7 @@ class ChooseUserPage extends StatelessWidget { id: 'tommaso', extraData: { 'name': 'Tommaso Barbugli', - 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U02U7SJP4-0f65a5997877-512', + 'image': 'https://avatars.githubusercontent.com/u/88735?s=400&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiZGV2ZW4ifQ.z3zI4PqJnNhc-1o-VKcmb6BnnQ0oxFNCRHwEulHqcWc': @@ -67,7 +65,7 @@ class ChooseUserPage extends StatelessWidget { extraData: { 'name': 'Deven Joshi', 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U01AM7ELPTL-8a60da32704c-512', + 'https://avatars.githubusercontent.com/u/26357843?s=400&u=0c61d890866e67bf69f58878be58915e9bfd39ee&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoibmVldmFzaCJ9.3EdHegTxibrz3A9cTiKmpEyawwcCVB8FXnoFzr4eKvw': @@ -76,7 +74,7 @@ class ChooseUserPage extends StatelessWidget { extraData: { 'name': 'Neevash Ramdial', 'image': - 'https://ca.slack-edge.com/T02RM6X6B-U01DZ046DS8-b00d321d2880-512', + 'https://avatars.githubusercontent.com/u/25674767?s=400&u=1d7333baf7dd9d143db8bfcdb31a838b89cfff9c&v=4', }, ), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoicWF0ZXN0MSJ9.fnelU7HcP7QoEEsCGteNlF1fppofzNlrnpDQuIgeKCU': diff --git a/stream_chat_v1/lib/main.dart b/stream_chat_v1/lib/main.dart index 73d945d..f9c81fc 100644 --- a/stream_chat_v1/lib/main.dart +++ b/stream_chat_v1/lib/main.dart @@ -55,7 +55,7 @@ class _MyAppState extends State with TickerProviderStateMixin { final client = StreamChatClient( apiKey ?? kDefaultStreamApiKey, - logLevel: Level.SEVERE, + logLevel: Level.INFO, )..chatPersistenceClient = chatPersistentClient; if (userId != null) { @@ -426,8 +426,10 @@ class _HomePageState extends State { onTap: () async { Navigator.pop(context); - final secureStorage = FlutterSecureStorage(); - await secureStorage.deleteAll(); + if (!kIsWeb) { + final secureStorage = FlutterSecureStorage(); + await secureStorage.deleteAll(); + } StreamChat.of(context).client.disconnect( clearUser: true, diff --git a/stream_chat_v1/web/manifest.json b/stream_chat_v1/web/manifest.json index 8c01291..97eb9af 100644 --- a/stream_chat_v1/web/manifest.json +++ b/stream_chat_v1/web/manifest.json @@ -1,11 +1,11 @@ { - "name": "example", - "short_name": "example", + "name": "Stream Chat v1", + "short_name": "SCv1", "start_url": ".", "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": "A new Flutter project.", + "description": "Sample app for the Stream Chat Flutter SDK", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [ From 39ab53e9d917527fa70ea6fdaa1617eeb7a38c54 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 8 Mar 2021 15:21:48 +0100 Subject: [PATCH 06/22] add gif --- stream_chat_v1/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stream_chat_v1/README.md b/stream_chat_v1/README.md index 834bc8d..a7d5437 100644 --- a/stream_chat_v1/README.md +++ b/stream_chat_v1/README.md @@ -22,6 +22,8 @@ It supports several advanced features like: - Markdown message formatting - Count for unread messages +![Features iOS](https://user-images.githubusercontent.com/20601437/110333493-eb023a80-8021-11eb-8fb1-b74f9ef37897.gif) + ## Getting Started Before running this project please ensure Flutter is installed and configured on your machine. If you're new to Flutter, please checkout the [official guide](https://flutter.dev/docs/get-started/install) with installation instructions for your OS. From ce41058d0d4c70fc97c0809753a9e495fc369786 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 13:58:58 +0100 Subject: [PATCH 07/22] update app pubspec --- stream_chat_v1/pubspec.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 63c1a0c..9437e3e 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -9,8 +9,16 @@ environment: dependencies: flutter: sdk: flutter - stream_chat_flutter: ^1.3.2-beta - stream_chat_persistence: ^1.3.0-beta + stream_chat_flutter: + git: + url: git@github.com:GetStream/stream-chat-flutter.git + ref: develop + path: packages/stream_chat_flutter + stream_chat_persistence: + git: + url: git@github.com:GetStream/stream-chat-flutter.git + ref: develop + path: packages/stream_chat_persistence flutter_local_notifications: ^2.0.2 flutter_svg: ^0.19.0 flutter_secure_storage: ^3.3.5 From 0db885c01461850705d29763a6bd4fa21a25c747 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 15:49:54 +0100 Subject: [PATCH 08/22] fix repo url --- stream_chat_v1/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 9437e3e..0d6aff4 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -11,12 +11,12 @@ dependencies: sdk: flutter stream_chat_flutter: git: - url: git@github.com:GetStream/stream-chat-flutter.git + url: https://github.com/GetStream/stream-chat-flutter.git ref: develop path: packages/stream_chat_flutter stream_chat_persistence: git: - url: git@github.com:GetStream/stream-chat-flutter.git + url: https://github.com/GetStream/stream-chat-flutter.git ref: develop path: packages/stream_chat_persistence flutter_local_notifications: ^2.0.2 From 867a6b4f91f7ff06cec44b6b1393aa4887411d01 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:14:27 +0100 Subject: [PATCH 09/22] update actions --- .github/workflows/build.yml | 1 + .github/workflows/build_nightly.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b9c9fe..8cc19ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: technote-space/auto-cancel-redundant-workflow@v1 - uses: actions/setup-java@v1 with: java-version: '12.x' diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 59bde38..d591a42 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -20,6 +20,7 @@ jobs: runs-on: [macos-latest] steps: - uses: actions/checkout@v2 + - uses: technote-space/auto-cancel-redundant-workflow@v1 - name: Install RubyGems run: | cd ios From 93a3c45e0b685c82b9f7bf254051249174f9e2f1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:15:19 +0100 Subject: [PATCH 10/22] update actions --- .github/workflows/build_nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index d591a42..815d989 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -45,6 +45,7 @@ jobs: build_and_deploy_android: runs-on: ubuntu-latest steps: + - uses: technote-space/auto-cancel-redundant-workflow@v1 - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: From 23b59874bb0f0be03d3a4a9275ec215afde1588d Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:18:38 +0100 Subject: [PATCH 11/22] update actions --- .github/workflows/build_nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 815d989..6521b4f 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -45,8 +45,8 @@ jobs: build_and_deploy_android: runs-on: ubuntu-latest steps: - - uses: technote-space/auto-cancel-redundant-workflow@v1 - uses: actions/checkout@v2 + - uses: technote-space/auto-cancel-redundant-workflow@v1 - uses: actions/setup-java@v1 with: java-version: '12.x' From b10f80146a000fb44d80aed529f57939174a503a Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:22:57 +0100 Subject: [PATCH 12/22] autocancel redundant builds --- .github/workflows/build.yml | 4 +++- .github/workflows/build_nightly.yml | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cc19ac..9681090 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: technote-space/auto-cancel-redundant-workflow@v1 + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/setup-java@v1 with: java-version: '12.x' diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index 6521b4f..c5d2dfc 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -20,7 +20,9 @@ jobs: runs-on: [macos-latest] steps: - uses: actions/checkout@v2 - - uses: technote-space/auto-cancel-redundant-workflow@v1 + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: Install RubyGems run: | cd ios @@ -46,7 +48,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: technote-space/auto-cancel-redundant-workflow@v1 + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/setup-java@v1 with: java-version: '12.x' From 1d60241cd28e69613a3ab527ee62cea6b68f6929 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 2 Mar 2021 16:25:15 +0100 Subject: [PATCH 13/22] autocancel redundant builds --- .github/workflows/build.yml | 3 --- .github/workflows/build_nightly.yml | 6 ------ 2 files changed, 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9681090..3b9c9fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/setup-java@v1 with: java-version: '12.x' diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index c5d2dfc..59bde38 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -20,9 +20,6 @@ jobs: runs-on: [macos-latest] steps: - uses: actions/checkout@v2 - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: Install RubyGems run: | cd ios @@ -48,9 +45,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/setup-java@v1 with: java-version: '12.x' From cde3527fc6ad1d6b4bcf5e0d92a28b30578d3d36 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 3 Mar 2021 19:17:26 +0100 Subject: [PATCH 14/22] update dependency --- stream_chat_v1/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 0d6aff4..7e9a569 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: ref: develop path: packages/stream_chat_persistence flutter_local_notifications: ^2.0.2 - flutter_svg: ^0.19.0 + flutter_svg: ^0.19.3 flutter_secure_storage: ^3.3.5 yaml: ^2.2.1 uuid: ^2.2.2 From 9bd892e253e3abc41546f20455914cc085aab620 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 4 Mar 2021 15:39:13 +0100 Subject: [PATCH 15/22] fix small backbuttons --- stream_chat_v1/lib/chat_info_screen.dart | 31 ++++------------------- stream_chat_v1/lib/group_info_screen.dart | 13 +--------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/stream_chat_v1/lib/chat_info_screen.dart b/stream_chat_v1/lib/chat_info_screen.dart index 4696a40..7df0a59 100644 --- a/stream_chat_v1/lib/chat_info_screen.dart +++ b/stream_chat_v1/lib/chat_info_screen.dart @@ -77,7 +77,6 @@ class _ChatInfoScreenState extends State { showOnlineStatus: false, ), ), - //SizedBox(height: 4.0), Text( widget.user.name, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), @@ -105,16 +104,10 @@ class _ChatInfoScreenState extends State { ], ), Positioned( - top: 21, - left: 16, - child: InkWell( - child: StreamSvgIcon.left( - color: StreamChatTheme.of(context).colorTheme.black, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), + top: 0, + left: 0, + width: 58, + child: StreamBackButton(), ), ], ), @@ -445,21 +438,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { color: StreamChatTheme.of(context).colorTheme.black, fontSize: 16.0), ), - leading: Center( - child: InkWell( - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - child: StreamSvgIcon.left( - color: StreamChatTheme.of(context).colorTheme.black, - size: 24.0, - ), - width: 24.0, - height: 24.0, - ), - ), - ), + leading: StreamBackButton(), backgroundColor: StreamChatTheme.of(context).colorTheme.white, ), body: StreamBuilder>( diff --git a/stream_chat_v1/lib/group_info_screen.dart b/stream_chat_v1/lib/group_info_screen.dart index ed72afa..1d2eaab 100644 --- a/stream_chat_v1/lib/group_info_screen.dart +++ b/stream_chat_v1/lib/group_info_screen.dart @@ -84,18 +84,7 @@ class _GroupInfoScreenState extends State { elevation: 1.0, toolbarHeight: 56.0, backgroundColor: StreamChatTheme.of(context).colorTheme.white, - leading: InkWell( - onTap: () { - Navigator.pop(context); - }, - child: Padding( - padding: const EdgeInsets.only(left: 12.0), - child: StreamSvgIcon.left( - color: StreamChatTheme.of(context).colorTheme.black, - ), - ), - ), - leadingWidth: 36.0, + leading: StreamBackButton(), title: Column( children: [ StreamBuilder( From a0f15c10b4540783fe5538d5bf2f0fa56a2691e2 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 5 Mar 2021 10:43:14 +0100 Subject: [PATCH 16/22] fix shared groups filter --- .../ios/Runner.xcodeproj/project.pbxproj | 2 -- stream_chat_v1/lib/chat_info_screen.dart | 14 +++++++++++--- stream_chat_v1/lib/main.dart | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj index 61504aa..6bb0a1f 100644 --- a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj +++ b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj @@ -314,7 +314,6 @@ "${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework", "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", - "${PODS_ROOT}/../Flutter/Flutter.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework", "${BUILT_PRODUCTS_DIR}/esys_flutter_share/esys_flutter_share.framework", @@ -345,7 +344,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/esys_flutter_share.framework", diff --git a/stream_chat_v1/lib/chat_info_screen.dart b/stream_chat_v1/lib/chat_info_screen.dart index 7df0a59..5c8441e 100644 --- a/stream_chat_v1/lib/chat_info_screen.dart +++ b/stream_chat_v1/lib/chat_info_screen.dart @@ -499,12 +499,20 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { ); } + final channels = snapshot.data + .where((c) => + c.state.members.any((m) => + m.userId != widget.mainUser.id && + m.userId != widget.otherUser.id) || + !c.isDistinct) + .toList(); + return ListView.builder( - itemCount: snapshot.data.length, + itemCount: channels.length, itemBuilder: (context, position) { return StreamChannel( - channel: snapshot.data[position], - child: _buildListTile(snapshot.data[position]), + channel: channels[position], + child: _buildListTile(channels[position]), ); }, ); diff --git a/stream_chat_v1/lib/main.dart b/stream_chat_v1/lib/main.dart index f9c81fc..94f10f0 100644 --- a/stream_chat_v1/lib/main.dart +++ b/stream_chat_v1/lib/main.dart @@ -55,7 +55,7 @@ class _MyAppState extends State with TickerProviderStateMixin { final client = StreamChatClient( apiKey ?? kDefaultStreamApiKey, - logLevel: Level.INFO, + logLevel: Level.SEVERE, )..chatPersistenceClient = chatPersistentClient; if (userId != null) { From 0418e6db29ef43dde5713f494e55d1d4a784de5f Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 5 Mar 2021 12:39:02 +0100 Subject: [PATCH 17/22] fix group info --- .../ios/Runner.xcodeproj/project.pbxproj | 106 +++++++++--------- stream_chat_v1/lib/group_info_screen.dart | 35 ++++-- stream_chat_v1/lib/main.dart | 1 + 3 files changed, 79 insertions(+), 63 deletions(-) diff --git a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj index 6bb0a1f..e3a96e7 100644 --- a/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj +++ b/stream_chat_v1/ios/Runner.xcodeproj/project.pbxproj @@ -11,8 +11,8 @@ 0BC14C54242B5A7A0028DE94 /* Notifications.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0BC14C4D242B5A7A0028DE94 /* Notifications.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 6322551A583705BBA2F048DD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC299D593714162503D904EB /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7DEC2743BD66C91B700A3B97 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BB2E5E4E236267EDF0D8817 /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -60,14 +60,13 @@ 0BC14C5B242B5FF50028DE94 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2452A9E77396497EB4CF3072 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 1DFB9D7CB4D2FBB0BD3BD534 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 34DDA6B7AEE7F881BA31E310 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 68F846A6DB42D92393F5F7E0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 7069E97E2E50CF0E633E719F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7BF51EE28C89025F73A5211F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 8BB2E5E4E236267EDF0D8817 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -75,6 +74,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CC299D593714162503D904EB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -89,7 +89,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7DEC2743BD66C91B700A3B97 /* Pods_Runner.framework in Frameworks */, + 6322551A583705BBA2F048DD /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,6 +106,14 @@ path = Notifications; sourceTree = ""; }; + 7771A729FBB96FF718254442 /* Frameworks */ = { + isa = PBXGroup; + children = ( + CC299D593714162503D904EB /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -125,7 +133,7 @@ 0BC14C4E242B5A7A0028DE94 /* Notifications */, 97C146EF1CF9000F007C117D /* Products */, CF168B61BAB91958681C7C21 /* Pods */, - BC09A38346C8B2CD72199469 /* Frameworks */, + 7771A729FBB96FF718254442 /* Frameworks */, ); sourceTree = ""; }; @@ -162,20 +170,12 @@ name = "Supporting Files"; sourceTree = ""; }; - BC09A38346C8B2CD72199469 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8BB2E5E4E236267EDF0D8817 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; CF168B61BAB91958681C7C21 /* Pods */ = { isa = PBXGroup; children = ( - 2452A9E77396497EB4CF3072 /* Pods-Runner.debug.xcconfig */, - 7BF51EE28C89025F73A5211F /* Pods-Runner.release.xcconfig */, - 68F846A6DB42D92393F5F7E0 /* Pods-Runner.profile.xcconfig */, + 1DFB9D7CB4D2FBB0BD3BD534 /* Pods-Runner.debug.xcconfig */, + 7069E97E2E50CF0E633E719F /* Pods-Runner.release.xcconfig */, + 34DDA6B7AEE7F881BA31E310 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -204,15 +204,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 9E02B5C38D6CC2455D9E48E9 /* [CP] Check Pods Manifest.lock */, + 22D055914083BAC1E72E76DD /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 5702861DACEDB848A3E454E8 /* [CP] Embed Pods Frameworks */, 0BC14C55242B5A7A0028DE94 /* Embed App Extensions */, + 21997A6DA96DFFF3D7D29CC3 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -288,21 +288,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 5702861DACEDB848A3E454E8 /* [CP] Embed Pods Frameworks */ = { + 21997A6DA96DFFF3D7D29CC3 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -372,21 +358,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - 9E02B5C38D6CC2455D9E48E9 /* [CP] Check Pods Manifest.lock */ = { + 22D055914083BAC1E72E76DD /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -408,6 +380,34 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -583,7 +583,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -672,7 +672,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -721,7 +721,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/stream_chat_v1/lib/group_info_screen.dart b/stream_chat_v1/lib/group_info_screen.dart index 1d2eaab..f0c7ff3 100644 --- a/stream_chat_v1/lib/group_info_screen.dart +++ b/stream_chat_v1/lib/group_info_screen.dart @@ -73,9 +73,11 @@ class _GroupInfoScreenState extends State { ); } - var userMember = snapshot.data - .firstWhere((e) => e.user.id == StreamChat.of(context).user.id); - var isOwner = userMember.role == 'owner'; + var userMember = snapshot.data.firstWhere( + (e) => e.user.id == StreamChat.of(context).user.id, + orElse: () => null, + ); + var isOwner = userMember?.role == 'owner'; return Scaffold( backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, @@ -192,9 +194,11 @@ class _GroupInfoScreenState extends State { return Material( child: InkWell( onTap: () { - var userMember = groupMembers.firstWhere( - (e) => e.user.id == StreamChat.of(context).user.id); - _showUserInfoModal(member.user, userMember.role == 'owner'); + final userMember = groupMembers.firstWhere( + (e) => e.user.id == StreamChat.of(context).user.id, + orElse: () => null, + ); + _showUserInfoModal(member.user, userMember?.role == 'owner'); }, child: Container( height: 65.0, @@ -586,10 +590,21 @@ class _GroupInfoScreenState extends State { width: 24.0, ), onTap: () async { - await channel.channel - .removeMembers([StreamChat.of(context).user.id]); - Navigator.pop(context); - Navigator.pop(context); + final res = await showConfirmationDialog( + context, + title: 'Leave conversation', + okText: 'LEAVE', + question: 'Are you sure you want to leave this conversation?', + cancelText: 'CANCEL', + icon: StreamSvgIcon.userRemove( + color: StreamChatTheme.of(context).colorTheme.accentRed, + ), + ); + if (res == true) { + final channel = StreamChannel.of(context).channel; + await channel.removeMembers([StreamChat.of(context).user.id]); + Navigator.pop(context); + } }, ), ], diff --git a/stream_chat_v1/lib/main.dart b/stream_chat_v1/lib/main.dart index 94f10f0..47ca9b6 100644 --- a/stream_chat_v1/lib/main.dart +++ b/stream_chat_v1/lib/main.dart @@ -719,6 +719,7 @@ class _ChannelListPageState extends State { ), channelWidget: ChannelPage(), onViewInfoTap: (channel) { + Navigator.pop(context); if (channel.memberCount == 2 && channel.isDistinct) { Navigator.push( context, From ee9baa5f6dda6e1fe03b45d1695f52bbc7fcf834 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 5 Mar 2021 15:43:24 +0100 Subject: [PATCH 18/22] fix chooseuser tiles --- stream_chat_v1/lib/choose_user_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/stream_chat_v1/lib/choose_user_page.dart b/stream_chat_v1/lib/choose_user_page.dart index a7c9eac..b796e5e 100644 --- a/stream_chat_v1/lib/choose_user_page.dart +++ b/stream_chat_v1/lib/choose_user_page.dart @@ -140,6 +140,7 @@ class ChooseUserPage extends StatelessWidget { final token = entry.key; final user = entry.value; return ListTile( + visualDensity: VisualDensity.compact, onTap: () async { showDialog( barrierDismissible: false, From 493ed3874fba28af09d81e9584479b8784eb1a05 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 8 Mar 2021 17:59:35 +0100 Subject: [PATCH 19/22] add app badge --- stream_chat_v1/lib/main.dart | 12 ++++++++++++ stream_chat_v1/pubspec.yaml | 1 + 2 files changed, 13 insertions(+) diff --git a/stream_chat_v1/lib/main.dart b/stream_chat_v1/lib/main.dart index 47ca9b6..d1db4ea 100644 --- a/stream_chat_v1/lib/main.dart +++ b/stream_chat_v1/lib/main.dart @@ -8,6 +8,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_app_badger/flutter_app_badger.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:lottie/lottie.dart'; import 'package:stream_chat_flutter/stream_chat_flutter.dart'; @@ -142,6 +143,16 @@ class _MyAppState extends State with TickerProviderStateMixin { }); }); } + + if (!kIsWeb) { + _initData.client.state?.totalUnreadCountStream?.listen((count) { + if (count > 0) { + FlutterAppBadger.updateBadgeCount(count); + } else { + FlutterAppBadger.removeBadge(); + } + }); + } }, ); _animationController.addStatusListener((status) { @@ -151,6 +162,7 @@ class _MyAppState extends State with TickerProviderStateMixin { }); } }); + super.initState(); } diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 7e9a569..97b84d9 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -7,6 +7,7 @@ environment: sdk: ">=2.2.2 <3.0.0" dependencies: + flutter_app_badger: ^1.1.2 flutter: sdk: flutter stream_chat_flutter: From d247c00c25969187e8defe3d3e3d6b9c2e5c36bf Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 9 Mar 2021 12:07:57 +0100 Subject: [PATCH 20/22] fix search list view --- stream_chat_v1/lib/main.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stream_chat_v1/lib/main.dart b/stream_chat_v1/lib/main.dart index d1db4ea..2fb2cf8 100644 --- a/stream_chat_v1/lib/main.dart +++ b/stream_chat_v1/lib/main.dart @@ -648,11 +648,12 @@ class _ChannelListPageState extends State { onPanDown: (_) => FocusScope.of(context).unfocus(), child: _isSearchActive ? MessageSearchListView( + showErrorTile: true, messageQuery: _channelQuery, filters: { 'members': { r'$in': [user.id] - } + }, }, sortOptions: [ SortOption( From f85e92f3baf420973d448250798b11d69cd420a1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 9 Mar 2021 19:00:54 +0100 Subject: [PATCH 21/22] bump version --- stream_chat_v1/pubspec.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 97b84d9..44a7df5 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -10,16 +10,8 @@ dependencies: flutter_app_badger: ^1.1.2 flutter: sdk: flutter - stream_chat_flutter: - git: - url: https://github.com/GetStream/stream-chat-flutter.git - ref: develop - path: packages/stream_chat_flutter - stream_chat_persistence: - git: - url: https://github.com/GetStream/stream-chat-flutter.git - ref: develop - path: packages/stream_chat_persistence + stream_chat_flutter: ^1.4.0-beta + stream_chat_persistence: ^1.4.0-beta flutter_local_notifications: ^2.0.2 flutter_svg: ^0.19.3 flutter_secure_storage: ^3.3.5 From 418ab3bfcfcdb811bb93d2de5e5fbc04e8e0f058 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 9 Mar 2021 19:01:03 +0100 Subject: [PATCH 22/22] bump version --- stream_chat_v1/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream_chat_v1/pubspec.yaml b/stream_chat_v1/pubspec.yaml index 44a7df5..dcf44a6 100644 --- a/stream_chat_v1/pubspec.yaml +++ b/stream_chat_v1/pubspec.yaml @@ -1,7 +1,7 @@ name: example description: A new Flutter project. publish_to: 'none' -version: 1.3.3 +version: 1.4.0 environment: sdk: ">=2.2.2 <3.0.0"