-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Delay restart after installing/uninstalling/updating plugins #2369
Conversation
- Option and UI - New prompts and notification messages
@@ -136,13 +146,11 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin) | |||
{ | |||
await Http.DownloadAsync(plugin.UrlDownload, filePath).ConfigureAwait(false); | |||
|
|||
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"), | |||
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_download_success"), plugin.Name)); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Download success notification removed.
Oh no looks like spell check is really broken... |
We will need to handle an obscure scenario where user chooses to do manual restart, install a plugin and then for some reason uninstalls the same plugin, this will freak flow out a little. Same thing but for vice versa will also happen- uninstall and install the same plugin. |
@@ -107,15 +107,15 @@ public interface IPublicAPI | |||
/// </summary> | |||
/// <param name="title">Message title</param> | |||
/// <param name="subTitle">Message subtitle</param> | |||
/// <param name="iconPath">Message icon path (relative path to your plugin folder)</param> | |||
/// <param name="iconPath">Full path to icon</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment change correct? Is it relative or full path? I thought it's still some like ./img/icon.png
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the full path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative path also works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative path also works
Are you sure? iirc I changed this line cuz I found a Python plugin had no icon. maybe it's a Python side issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flow.Launcher/Flow.Launcher.Plugin/Result.cs
Lines 63 to 81 in 026e5f5
public string IcoPath | |
{ | |
get { return _icoPath; } | |
set | |
{ | |
// As a standard this property will handle prepping and converting to absolute local path for icon image processing | |
if (!string.IsNullOrEmpty(value) | |
&& !string.IsNullOrEmpty(PluginDirectory) | |
&& !Path.IsPathRooted(value) | |
&& !value.StartsWith("http://", StringComparison.OrdinalIgnoreCase) | |
&& !value.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) | |
{ | |
_icoPath = Path.Combine(PluginDirectory, value); | |
} | |
else | |
{ | |
_icoPath = value; | |
} | |
} |
Maybe the json parser doesn't abide this setter?
Best I can think of that is easy to solve is persisting three type of lists installed/uninstalled/updated in memory and each action should check against this list first. |
Co-authored-by: Jeremy Wu <[email protected]>
This reverts commit 0c8729f.
You can't uninstall right after installing since the installed plugin is not added to list yet. Installing after uninstalling throws exception though. |
- Download zip to temp folder - Unzip to unique folder
hey @VictoriousRaptor looks like you added merging the plugins manager functionality to this PR, is it possible to branch this change out so this PR is just for the delay restart ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Feature
Changes
Core
Core.PluginManager
Plugins Manger
AutoRestartAfterChanging
. Default isfalse
. (Should we set to true to keep current behavior?)pm install
pm install
andpm update
resultspm Install
results.Tests:
AutoRestartAfterChanging == false
.