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

Fix folder id generation. #1148

Merged
merged 5 commits into from
Nov 6, 2023
Merged

Fix folder id generation. #1148

merged 5 commits into from
Nov 6, 2023

Conversation

Jonas-Sander
Copy link
Collaborator

The attempt variable was wrongly increased before leading to this error (too many recursive calls):

packages/filesharing_logic/src/models/folder.dart 125:46                 generateFolderID
5443
packages/filesharing_logic/src/models/folder.dart 126:14                 generateFolderID
packages/sharezone/filesharing/widgets/file_sharing_page_fab.dart 75:34  <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50       <fn>
dart-sdk/lib/async/zone.dart 1661:54                                     runUnary
dart-sdk/lib/async/future_impl.dart 156:18                               handleValue
dart-sdk/lib/async/future_impl.dart 840:44                               handleValueCallback
dart-sdk/lib/async/future_impl.dart 869:13                               _propagateToListeners
dart-sdk/lib/async/future_impl.dart 641:5                                [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 715:7                                callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                         _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                          _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:15      <fn>

@github-actions github-actions bot added feature: file-sharing Files can be shared inside Sharezone e.g. by uploading them in a file-sharing folder of a course. feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features. labels Nov 3, 2023
@@ -127,7 +127,7 @@ class Folder {
fileSharingData: fileSharingData,
folderName: folderName,
folderPath: folderPath,
attempt: attempt++);
attempt: attempt + 1);
Copy link
Collaborator Author

@Jonas-Sander Jonas-Sander Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
attempt: attempt + 1);
attempt: ++attempt);

This would also be possible, but I think I like attempt + 1 better.

Copy link

github-actions bot commented Nov 3, 2023

Visit the preview URL for this PR (updated for commit 4f0675c):

https://sharezone-test--pr1148-fix-folder-id-genera-48ydyyap.web.app

(expires Thu, 09 Nov 2023 11:11:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

Copy link
Member

@nilsreichardt nilsreichardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jonas-Sander Jonas-Sander added this pull request to the merge queue Nov 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2023
@Jonas-Sander Jonas-Sander added this pull request to the merge queue Nov 6, 2023
@Jonas-Sander Jonas-Sander removed this pull request from the merge queue due to a manual request Nov 6, 2023
@github-actions github-actions bot added the ci/cd label Nov 6, 2023
@github-actions github-actions bot removed the ci/cd label Nov 6, 2023
@Jonas-Sander Jonas-Sander added this pull request to the merge queue Nov 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2023
@Jonas-Sander Jonas-Sander added this pull request to the merge queue Nov 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2023
@Jonas-Sander Jonas-Sander added this pull request to the merge queue Nov 6, 2023
Merged via the queue into main with commit a0e5d01 Nov 6, 2023
21 checks passed
@Jonas-Sander Jonas-Sander deleted the fix-folder-id-generation branch November 6, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: file-sharing Files can be shared inside Sharezone e.g. by uploading them in a file-sharing folder of a course. feature: universal file features File features (downloading, preview, etc.) that are used by multiple Sharezone features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants