Skip to content

Commit 4f5b2d3

Browse files
committed
Allow plugin to add & remove actionkeywords
1 parent bd74a87 commit 4f5b2d3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Flow.Launcher.Plugin/IPublicAPI.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,10 @@ public interface IPublicAPI
9595
Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default);
9696

9797
Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath);
98+
99+
void AddActionKeyword(string pluginId, string newActionKeyword);
100+
101+
void RemoveActionKeyword(string pluginId, string oldActionKeyword);
102+
98103
}
99104
}

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ public Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath)
149149
return Http.DownloadAsync(url, filePath);
150150
}
151151

152+
public void AddActionKeyword(string pluginId, string newActionKeyword)
153+
{
154+
PluginManager.AddActionKeyword(pluginId, newActionKeyword);
155+
}
156+
157+
public void RemoveActionKeyword(string pluginId, string oldActionKeyword)
158+
{
159+
PluginManager.RemoveActionKeyword(pluginId, oldActionKeyword);
160+
}
152161
#endregion
153162

154163
#region Private Methods

0 commit comments

Comments
 (0)