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

Open news feed when RuneLite starts after an update #907

Open
lynlevenick opened this issue Mar 9, 2018 · 14 comments

Comments

Projects
None yet
7 participants
@lynlevenick
Copy link
Contributor

commented Mar 9, 2018

Some players might not be aware that the client has updated, and it might be helpful to nudge them to check out the patch notes to help them discover new features or fixes.

@skimboarder

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2018

I've been playing around with this in between classes today. Currently, I have a simple dialogue window that pops up if the users client is out-of-date. If the user clicks 'Ok' their browser will open to the patch notes. If they press cancel then the client proceeds as it currently does.

If the browser can't be opened for some reason, a dialogue opens to let them know and allows them to copy the blog post URL to their clipboard.

Does this sound sufficient?

@Adam-

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

Generally if the client is out of date there are no patch notes, since there is no newer release.

@skimboarder

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2018

Hmm I think I'm misunderstanding something. When the client starts up in ClientLoader.loadRs(), there is a check made on UpdateCheckClient.isOutdated(). If this returns true I had believed this meant the user was behind the current version and an update would be triggered to obtain the newer release.

Is this not correct?

I get the patch notes by just getting the most recent blog entry obtained by BlogService.getBlogPosts() which will obviously fail if the most recent post is not the patch notes. I'll need to do some testing of this to make sure it behaves properly.

@Kamielvf

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

UpdateCheckClient.isOutdated() will check the current OSRS version vs the runescape-client and check if that one is outdated. I don't think it's the RuneLite client.

The launcher will run before the RuneLite client, and it will update trough there if there's a newer version.

I might be wrong but I think that's how it works.

@Adam-

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

The launcher always ensures you are running the latest release. If it is outdated it means Jagex has updated and we haven't yet. So there is no further RuneLite update. OSB has a "reduced functionality" mode for this situation that pops up a dialog. We just generally don't load any plugins but otherwise don't say much.

@skimboarder

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2018

Ahhh okay. I understand now, thank you. It seems like this can most likely not be implemented then, right? At least not from the client...

@Adam-

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

Opening it only after an update? Probably not too easily. I wouldn't mind seeing the feed panel open by default though.

@ShaunDreclin

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2018

Yeah I'd say just have the client launch with the news feed open, with an option to disable that feature somewhere.

@devLotto

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

@Subscribe
public void onClientUILoaded(ClientUILoaded e)
{
	navButton.setSelected(true);
	navButton.getOnSelect().run();
}

in FeedPlugin seems to do it. Idk if this is the best way to go about it.

@Kamielvf

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

You could maybe check the date of the latest blog post and open the panel only if the posts' timestamp is within an hour of current time if you really wanted to only open it when there was an update.

Then again, I wouldn't mind if it always opened by default.

@Adam-

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

For some reason the blog post times are only accurate to 1 day.

@devLotto

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

^ @deathbeam

They should really be more accurate I think

@deathbeam

This comment has been minimized.

Copy link
Member

commented Mar 26, 2018

The blog post knows only about the date of the post and not exact time (as it is taken from the blog file name) so you can't get hour from that. I can maybe extend the blog loader to add support for hour and minute to the file name.

For opening the sidebar by default, what @devLotto did in snippet is the correct way to do it I think, except the setSelected what is no longer required, as the getOnSelect callback manages the selection state. But i don't know if it is good idea to do it, might screw up some layout managers and also might confuse people who set custom size to client.

@lynlevenick

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2018

I’m in favor of an option to show the changes or news panel whenever there’s an update, no matter when the blog post happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.