forked from spesmilo/electrum
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly setting the "use_labels" setting in the Android code might be antithetical to "plugins" but since there is no way to plug in or out modules in runtime in Android we might as well hardcode when needed. There are a couple of things to fix/investigate: * Currently the application has to be restarted when the settings have changed. * run_hook is not runned on main thread and a warning is printed. Is this a problem here? * Is a force upload/download option needed? * Should the 'android' part of the plugin, including the hooks, be more generically named? There isn't any Android specific things and other clients (iOS?) could use it...
- Loading branch information
1 parent
f61b6d3
commit 9d51b73
Showing
7 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from electroncash.plugins import hook | ||
|
||
from .labels import LabelsPlugin | ||
|
||
class Plugin(LabelsPlugin): | ||
def __init__(self, *args): | ||
LabelsPlugin.__init__(self, *args) | ||
|
||
@hook | ||
def start_android_wallet(self, wallet): | ||
self.start_wallet(wallet) | ||
|
||
@hook | ||
def stop_android_wallet(self, wallet): | ||
self.stop_wallet(wallet) |