Skip to content

Commit ac46fdc

Browse files
committed
remove code that has been marked obsolete
1 parent 2df1075 commit ac46fdc

File tree

13 files changed

+1
-246
lines changed

13 files changed

+1
-246
lines changed

Flow.Launcher.Infrastructure/Alphabet.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -95,27 +95,6 @@ public void Save()
9595
private static string[] EmptyStringArray = new string[0];
9696
private static string[][] Empty2DStringArray = new string[0][];
9797

98-
[Obsolete("Not accurate, eg 音乐 will not return yinyue but returns yinle ")]
99-
/// <summary>
100-
/// replace chinese character with pinyin, non chinese character won't be modified
101-
/// <param name="word"> should be word or sentence, instead of single character. e.g. 微软 </param>
102-
/// </summary>
103-
public string[] Pinyin(string word)
104-
{
105-
if (!_settings.ShouldUsePinyin)
106-
{
107-
return EmptyStringArray;
108-
}
109-
110-
var pinyin = word.Select(c =>
111-
{
112-
var pinyins = PinyinHelper.toHanyuPinyinStringArray(c);
113-
var result = pinyins == null ? c.ToString() : pinyins[0];
114-
return result;
115-
}).ToArray();
116-
return pinyin;
117-
}
118-
11998
/// <summmary>
12099
/// replace chinese character with pinyin, non chinese character won't be modified
121100
/// Because we don't have words dictionary, so we can only return all possiblie pinyin combination

Flow.Launcher.Infrastructure/FuzzyMatcher.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

Flow.Launcher.Infrastructure/StringMatcher.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,6 @@ public StringMatcher(IAlphabet alphabet = null)
2121

2222
public static StringMatcher Instance { get; internal set; }
2323

24-
[Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
25-
public static int Score(string source, string target)
26-
{
27-
return FuzzySearch(target, source).Score;
28-
}
29-
30-
[Obsolete("This method is obsolete and should not be used. Please use the static function StringMatcher.FuzzySearch")]
31-
public static bool IsMatch(string source, string target)
32-
{
33-
return Score(source, target) > 0;
34-
}
35-
3624
public static MatchResult FuzzySearch(string query, string stringToCompare)
3725
{
3826
return Instance.FuzzyMatch(query, stringToCompare);
@@ -323,18 +311,6 @@ private int ScoreAfterSearchPrecisionFilter(int rawScore)
323311

324312
public class MatchOption
325313
{
326-
/// <summary>
327-
/// prefix of match char, use for highlight
328-
/// </summary>
329-
[Obsolete("this is never used")]
330-
public string Prefix { get; set; } = "";
331-
332-
/// <summary>
333-
/// suffix of match char, use for highlight
334-
/// </summary>
335-
[Obsolete("this is never used")]
336-
public string Suffix { get; set; } = "";
337-
338314
public bool IgnoreCase { get; set; } = true;
339315
}
340316
}

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ public string QuerySearchPrecisionString
7070
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();
7171
public ObservableCollection<CustomPluginHotkey> CustomPluginHotkeys { get; set; } = new ObservableCollection<CustomPluginHotkey>();
7272

73-
[Obsolete]
74-
public double Opacity { get; set; } = 1;
75-
76-
[Obsolete]
77-
public OpacityMode OpacityMode { get; set; } = OpacityMode.Normal;
78-
7973
public bool DontPromptUpdateMsg { get; set; }
8074
public bool EnableUpdateLog { get; set; }
8175

@@ -108,12 +102,4 @@ public enum LastQueryMode
108102
Empty,
109103
Preserved
110104
}
111-
112-
[Obsolete]
113-
public enum OpacityMode
114-
{
115-
Normal = 0,
116-
LayeredWindow = 1,
117-
DWM = 2
118-
}
119105
}

Flow.Launcher.Plugin/Feature.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,6 @@ public interface IContextMenu : IFeatures
1111
List<Result> LoadContextMenus(Result selectedResult);
1212
}
1313

14-
[Obsolete("If a plugin has a action keyword, then it is exclusive. This interface will be remove in v1.3.0")]
15-
public interface IExclusiveQuery : IFeatures
16-
{
17-
[Obsolete("If a plugin has a action keyword, then it is exclusive. This method will be remove in v1.3.0")]
18-
bool IsExclusiveQuery(Query query);
19-
}
20-
21-
/// <summary>
22-
/// Represent plugin query will be executed in UI thread directly. Don't do long-running operation in Query method if you implement this interface
23-
/// <remarks>This will improve the performance of instant search like websearch or cmd plugin</remarks>
24-
/// </summary>
25-
[Obsolete("Flow Launcher is fast enough now, executed on ui thread is no longer needed")]
26-
public interface IInstantQuery : IFeatures
27-
{
28-
bool IsInstantQuery(string query);
29-
}
30-
3114
/// <summary>
3215
/// Represent plugins that support internationalization
3316
/// </summary>

Flow.Launcher.Plugin/Features/IContextMenu.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Flow.Launcher.Plugin/Features/IExclusiveQuery.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Flow.Launcher.Plugin/Features/IInstantQuery.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Flow.Launcher.Plugin/IPublicAPI.cs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ namespace Flow.Launcher.Plugin
88
/// </summary>
99
public interface IPublicAPI
1010
{
11-
/// <summary>
12-
/// Push result to query box
13-
/// </summary>
14-
/// <param name="query"></param>
15-
/// <param name="plugin"></param>
16-
/// <param name="results"></param>
17-
[Obsolete("This method will be removed in Flow Launcher 1.3")]
18-
void PushResults(Query query, PluginMetadata plugin, List<Result> results);
19-
2011
/// <summary>
2112
/// Change Flow.Launcher query
2213
/// </summary>
@@ -27,42 +18,11 @@ public interface IPublicAPI
2718
/// </param>
2819
void ChangeQuery(string query, bool requery = false);
2920

30-
/// <summary>
31-
/// Just change the query text, this won't raise search
32-
/// </summary>
33-
/// <param name="query"></param>
34-
[Obsolete]
35-
void ChangeQueryText(string query, bool selectAll = false);
36-
37-
/// <summary>
38-
/// Close Flow Launcher
39-
/// </summary>
40-
[Obsolete]
41-
void CloseApp();
42-
4321
/// <summary>
4422
/// Restart Flow Launcher
4523
/// </summary>
4624
void RestartApp();
4725

48-
/// <summary>
49-
/// Restart Flow Launcher
50-
/// </summary>
51-
[Obsolete("Use RestartApp instead. This method will be removed in Flow Launcher 1.3")]
52-
void RestarApp();
53-
54-
/// <summary>
55-
/// Hide Flow Launcher
56-
/// </summary>
57-
[Obsolete]
58-
void HideApp();
59-
60-
/// <summary>
61-
/// Show Flow Launcher
62-
/// </summary>
63-
[Obsolete]
64-
void ShowApp();
65-
6626
/// <summary>
6727
/// Save all Flow Launcher settings
6828
/// </summary>
@@ -103,18 +63,6 @@ public interface IPublicAPI
10363
/// </summary>
10464
void OpenSettingDialog();
10565

106-
/// <summary>
107-
/// Show loading animation
108-
/// </summary>
109-
[Obsolete("automatically start")]
110-
void StartLoadingBar();
111-
112-
/// <summary>
113-
/// Stop loading animation
114-
/// </summary>
115-
[Obsolete("automatically stop")]
116-
void StopLoadingBar();
117-
11866
/// <summary>
11967
/// Install Flow Launcher plugin
12068
/// </summary>

Flow.Launcher.Plugin/PluginMetadata.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ public override string ToString()
4343
return Name;
4444
}
4545

46-
[Obsolete("Use IcoPath")]
47-
public string FullIcoPath => IcoPath;
48-
4946
/// <summary>
5047
/// Init time include both plugin load time and init time
5148
/// </summary>

0 commit comments

Comments
 (0)