Skip to content
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

Allow to deactivate Rich Presence integration #50

Merged
merged 4 commits into from
Aug 22, 2018
Merged

Conversation

echebbi
Copy link
Owner

@echebbi echebbi commented Aug 22, 2018

Allows to deactivate the integration from the plug-in Preferences page (Window > Preferences > Discord Rich Presence > Activate Rich Presence Integration).

Eclipse IDE does not communicate with Discord when the integration is deactivated, which means that Discord does not display Playing Eclipse IDE anymore.

The integration can now be deactivated from the plug-in's Preferences page.
When the integration is deactivated, the plug-in still works as usual,
the only difference is that it does not send any information to Discord anymore.
The elapsed time was reset each time the integration was deactivated then activated again.
In the end, this class merely instantiate a new PreferredRichPresence when
show() is called. This does not worth the overweight of maintaining a whole class.
@echebbi echebbi added the enhancement New feature or request label Aug 22, 2018
@echebbi echebbi self-assigned this Aug 22, 2018
@codecov
Copy link

codecov bot commented Aug 22, 2018

Codecov Report

Merging #50 into master will decrease coverage by 0.59%.
The diff coverage is 65.34%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master      #50     +/-   ##
===========================================
- Coverage     74.78%   74.19%   -0.6%     
- Complexity      179      193     +14     
===========================================
  Files            22       22             
  Lines           595      620     +25     
  Branches         62       63      +1     
===========================================
+ Hits            445      460     +15     
- Misses          135      147     +12     
+ Partials         15       13      -2
Impacted Files Coverage Δ Complexity Δ
...cord/rpc/integration/core/DiscordRpcLifecycle.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...tegration/settings/ProjectPreferencesListener.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...d/rpc/integration/settings/ProjectPreferences.java 8% <0%> (+8%) 1 <0> (+1) ⬆️
...rd/rpc/integration/settings/GlobalPreferences.java 34.61% <0%> (+14.61%) 3 <0> (+2) ⬆️
.../discord/rpc/integration/core/DiscordRpcProxy.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rd/rpc/integration/core/PreferredRichPresence.java 94.73% <100%> (-5.27%) 10 <1> (-1)
...d/rpc/integration/listener/RunOnSettingChange.java 100% <100%> (ø) 12 <5> (+4) ⬆️
...c/integration/listener/ConnectionSynchronizer.java 100% <100%> (ø) 12 <12> (?)
...u/discord/rpc/integration/core/SelectionTimes.java 100% <100%> (ø) 8 <5> (+1) ⬆️
...ntegration/settings/GlobalPreferencesListener.java 100% <100%> (ø) 14 <4> (+1) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e5d006...294148d. Read the comment docs.

@echebbi echebbi merged commit 6caec76 into master Aug 22, 2018
@echebbi echebbi deleted the deactivate_plugin branch August 22, 2018 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant