Commit graph

62 commits

Author SHA1 Message Date
01Dri
10d353defe Returning actions 2025-10-15 00:34:38 -03:00
01Dri
9ca7c8431b Revert modifications and returning actions 2025-10-15 00:34:16 -03:00
01Dri
f31abe83b0 PopulateHistoryFromLegacyHistory with HistoryStyle 2025-10-14 23:12:25 -03:00
01Dri
d5a2695766 Update the history item if it equals the last added item or already exists in the list. 2025-10-14 22:50:29 -03:00
01Dri
0131b92c7a The HistoryStyle property is used to distinguish history items 2025-10-14 22:47:58 -03:00
Jack251970
787ccad384 Refactor history handling with async ResultHelper
Replaced `HistoryHelper` with a new `ResultHelper` class to handle plugin result population asynchronously, improving performance and maintainability. Removed `ExecuteAction` and `QueryAction` properties from `LastOpenedHistoryItem` and updated `QueryHistory` and `MainViewModel` to use `LastOpenedHistoryItems` directly.

Refactored history result generation to support `AsyncAction` in `Result` objects, replacing synchronous plugin queries. Simplified legacy history migration and enhanced support for `HistoryStyle`. Improved error handling, code readability, and UI-related logic for history navigation.
2025-10-14 21:29:22 +08:00
Jack251970
f6d5a27e0b Refactor and enhance history management system
Refactored the `History` class to separate query and last opened history into distinct models, introducing `LastOpenedHistoryItem` and deprecating `HistoryItem`. Added a `HistoryStyle` enum and property to allow users to toggle between "Query History" and "Last Opened History." Simplified history display logic and updated the UI with a dropdown for history style selection.

Improved history item display with dynamic action population and relative timestamps. Enhanced performance by optimizing history storage with a maximum limit and streamlined logic for adding/retrieving items. Ensured backward compatibility by migrating legacy history data to the new format.

Updated localization strings, removed deprecated properties, and cleaned up redundant code. Fixed bugs related to inconsistent history actions and edge cases with legacy data.
2025-10-14 20:28:39 +08:00
Jack251970
b84ca9b283 Improve code quality 2025-10-14 19:39:33 +08:00
Jack251970
7fa78f0304 Code cleanup 2025-10-13 15:30:38 +08:00
Jack251970
e3527f47ea Add RecordKey for precise history matching and refactor
Added a `RecordKey` property to `HistoryItem` for unique identification of history records, enabling more accurate matching during queries and executions. Updated `HistoryHelper` methods to utilize `RecordKey` for matching, with fallback to `Title` and `SubTitle`. Enhanced `GetExecuteAction` with error handling, nullable reference types, and improved matching logic. Included `RecordKey` in `History` object creation. Enabled nullable reference types in `HistoryHelper.cs` for better code safety. Refactored code for clarity and maintainability.
2025-10-13 15:27:06 +08:00
01Dri
2b7c2048ef up 2025-10-11 05:26:28 -03:00
01Dri
a3b7c6808b up 2025-10-11 04:29:33 -03:00
01Dri
a1f82e1652 refactor: using count for better performance 2025-10-11 03:47:04 -03:00
01Dri
690d33ece3 up 2025-10-11 03:43:06 -03:00
01Dri
d7579cce9e fix erros 2025-10-11 03:23:14 -03:00
01Dri
e468c48da4 feat: fix erros 2025-10-11 03:15:10 -03:00
01Dri
e6cae1a79b feat: helper 2025-10-11 03:08:23 -03:00
01Dri
95122e91f5 feat: code quality 2025-10-11 02:56:49 -03:00
01Dri
bf2acfec38 feat: code quality 2025-10-11 02:54:29 -03:00
01Dri
9e1b8c1a72 feat: Populate new history system with legacy query history 2025-10-11 02:43:27 -03:00
01Dri
50f5e850dd feat: code quality 2025-10-09 23:47:59 -03:00
01Dri
d122276e71 feat: clean imports 2025-10-08 22:09:09 -03:00
01Dri
06711d3b8b feat: Saving actions for history 2025-10-08 21:12:36 -03:00
01Dri
4f2db28196 faet: query action save 2025-10-08 21:12:14 -03:00
01Dri
e5736567f6 feat: created a base History model 2025-10-07 00:33:16 -03:00
01Dri
5fcd01224c feat: text 2025-10-02 00:19:40 -03:00
01Dri
bc1f9d3734 refactor: renaming executed history to last opened history 2025-10-02 00:09:28 -03:00
01Dri
c0369e6e76 feat: radio button with history query option or history executed option 2025-10-02 00:03:48 -03:00
01Dri
3cc4f13f4d feat: New option to show executed results in settings 2025-10-01 23:05:41 -03:00
Jack Ye
c1ba81eee0
Merge pull request #3500 from Flow-Launcher/multiple_topmost
Support Multiple Topmost Records
2025-05-14 11:18:00 +08:00
Jack251970
0e6741cf3f Improve code quality 2025-05-11 17:05:55 +08:00
Jack251970
6ed5308896 Fix null origin query issue 2025-05-11 16:53:44 +08:00
Jack251970
b25777b734 Use ConcurrentQueue to storage the data sequence & Put latter record topper 2025-05-02 10:28:35 +08:00
Jack251970
7103c8d24a Mark old data as obsolete 2025-05-02 09:59:06 +08:00
Jack251970
58b9f0c19c Improve remove logic 2025-05-01 13:47:35 +08:00
Jack251970
c49b3b7cba Fix TryTake may remove the wrong element 2025-05-01 13:42:54 +08:00
Jack251970
0673d07c2a Improve code comments & Make classes internal 2025-05-01 13:23:22 +08:00
Jack251970
07f44f2377 Add code comments 2025-05-01 13:19:23 +08:00
Jack251970
845c331cac Remove the bag from dictionary if the bag is empty 2025-05-01 13:16:16 +08:00
Jack251970
af087fb85b Support multiple topmost records storage 2025-05-01 12:49:20 +08:00
Jack251970
0d61908575 Support multiple topmost records 2025-05-01 11:41:53 +08:00
Jack251970
980b792cb3 Wrap operation in one class 2025-05-01 11:06:52 +08:00
Jeremy Wu
735cc14821
Merge pull request #3203 from Jack251970/context_menu_back_to_query
Improve context menu item action response & Fix origin query null exception
2025-02-18 21:57:32 +11:00
Jack251970
80f54ba0de Fix more possible origin query null exception & Remove useless load function 2025-01-26 20:51:12 +08:00
Jack251970
95c8475c43 Fix null exception when result is from context menu & Add documents 2025-01-26 20:45:58 +08:00
Jack251970
198442621a Add support for record key 2025-01-21 14:37:14 +08:00
Jack251970
c665482cb7 Improve code quality 2024-12-02 13:10:46 +08:00
Jack251970
c474b304f5 Fix possible null reference 2024-11-27 21:21:42 +08:00
Jack251970
b95bbb3e6a Introduce concurrent directionary for topmost record 2024-11-27 20:56:14 +08:00
Jack251970
0720779c6b Fix possible null reference when query is cancelled 2024-11-27 20:19:31 +08:00