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

Add RuneShare plugin #7156

Merged
merged 6 commits into from
Dec 28, 2024
Merged

Add RuneShare plugin #7156

merged 6 commits into from
Dec 28, 2024

Conversation

kcdragon
Copy link
Contributor

RuneShare is a web app and plugin I'm developing to share and discover bank tabs. This plugin sends bank tag tab data (from the Bank Tabs plugin) to https://osrs.runeshare.app/. Each player has their own account on RuneShare and they use an API token to configure the plugin. It's currently a one way sync. Changes are sent to the web app but not from the web app to the plugin.

There are two sync modes: auto sync and manual sync. By default, manual sync is enabled and the player chooses which bank tag tabs to sync. If auto sync is enabled, the active bank tag tab will be synced.

The README describes the setup instructions for the plugin.

Let me know if I can add any more details to help the review process. I appreciate you reviewing. Thanks!

@runelite-github-app
Copy link

runelite-github-app bot commented Dec 15, 2024

```
Do not create fresh Gson instances, always @Inject the client's Gson.
You can customize it by calling .newBuilder() on it
```
Trying to address this build error
```
Do not create fresh Gson instances, always @Inject the client's Gson.
You can customize it by calling .newBuilder() on it
```
@LlemonDuck
Copy link
Contributor

@ConfigItem(...)
default String apiToken() { return null; }

@ConfigItem(...)
default boolean autoSave() { return true; } // or false?

@LlemonDuck LlemonDuck added the waiting for author waiting for the pr author to make changes or respond to questions label Dec 19, 2024
@raiyni
Copy link
Member

raiyni commented Dec 19, 2024

This looks like it will also block the client thread and swing thread. Please inject our okhttp client and use enqueue.

@kcdragon
Copy link
Contributor Author

Thanks for taking a look! I'll implement the changes.

@runelite-github-app runelite-github-app bot removed the waiting for author waiting for the pr author to make changes or respond to questions label Dec 19, 2024
* Add defaults for configs
* Use `okHttpClient` and `enqueue` the request so it doesn't block the client thread and swing thread
@kcdragon
Copy link
Contributor Author

@LlemonDuck @raiyni Thanks for the feedback. I think I fixed those issues correctly but let me know if I didn't and need to make a change. Thanks!

@LlemonDuck
Copy link
Contributor

The client thread and the Swing thread are different things, don't use Client#invokeLater to perform Swing operations: https://github.com/kcdragon/runeshare-plugin/blob/f84a42f818694a38252035f5b1b81f0d0cf9639a/src/main/java/app/runeshare/RuneSharePlugin.java#L102-L104

@LlemonDuck LlemonDuck added the waiting for author waiting for the pr author to make changes or respond to questions label Dec 24, 2024
kcdragon added a commit to kcdragon/runeshare-plugin that referenced this pull request Dec 25, 2024
@runelite-github-app runelite-github-app bot removed the waiting for author waiting for the pr author to make changes or respond to questions label Dec 25, 2024
@kcdragon
Copy link
Contributor Author

@LlemonDuck Ah I think I see what you mean now. I changed the clientThread.invokeLater calls to SwingUtilities.invokeLater. Is that what you were looking for? Thanks!

@LlemonDuck LlemonDuck merged commit 9967e2a into runelite:master Dec 28, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants