Preserve the original PDF selection during asynchronous text extraction - #1
Merged
palmoni5 merged 1 commit intoOct 5, 2026
Conversation
Owner
|
יש לפתוח מול ענף |
Owner
|
בסדר, טופל |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
הבעיה והתיקון
ב־
ff9785dd, הוספתselectedTextIfLoadedשינתה גם אתgetSelectedTextRanges(): אחרי טעינת עמודי הביניים נקראה מחדש הבחירה הנוכחית. ניקוי או החלפת הבחירה בזמן הטעינה גרמו לפעולת חילוץ/העתקה שכבר התחילה להחזיר טקסט ריק או טקסט מהבחירה החדשה.התיקון מחזיר את מסלול החילוץ האסינכרוני למימושו הקודם, ששומר את קצות הבחירה לאורך ההמתנה ואת ההתנהגות כשעמוד אינו זמין. הקריאה הסינכרונית מהמטמון נשארת זמינה ללא שינוי.
נוספו בדיקות עם PDF בן 30 עמודים: ניקוי והחלפת הבחירה במהלך חילוץ, ו־
selectedTextIfLoadedשמחזירnullלפני טעינת עמודי ביניים ואז את מלוא הטקסט. שתי בדיקות הרגרסיה נכשלו לפני התיקון ועוברות אחריו. תוקנה גם הפניית dartdoc לפרמטר שכבר אינו קיים, כדי שהניתוח הסטטי של החבילה יעבור נקי.אימות
flutter analyze --no-pubב־packages/pdfrx: ללא הערות.flutter test --no-pubב־packages/pdfrx: כל 54 הבדיקות עברו, כולל בדיקות בחירה, תפריטי הקשר וטעינה ברשת איטית.PDFIUM_PATHלספרייה המקומית וקובץ מיפוי native assets מקומי שאינו חלק מהשינוי.התיקון נדרש עבור Otzaria/otzaria#1860. מומלץ לשלב אותו גם בענף של espresso3389#733 לפני שהשינוי נתרם לאפסטרים.