Changelog window missing content

Issue #2 new
Vadim Peretokin created an issue

We've had issues with the changelog window not actually showing any content for a couple of releases (https://github.com/Mudlet/Mudlet/issues/1514)

The code to bring it up on application start is pretty straightforward:

void Updater::showChangelog() const
{
    auto changelogDialog = new dblsqd::UpdateDialog(feed, dblsqd::UpdateDialog::ManualChangelog);
    changelogDialog->show();
}

Could this be a case of a race condition - the feed is not downloaded yet when the changelog is shown?

Comments (4)

  1. pentacent repo owner

    Hey Vadim,

    thank you for this report. I don’t think this is caused by a race condition, because if it were, the window would still update after loading the feed.

    The problem seems to be the following: Since the user already has the latest version, the Feed doesn’t contain any updates but Mudlet shows the UpdateDialog regardless.

    In order to better support your use case, my suggestion would be the following:

    1) Add a new method to UpdateDialog: UpdateDialog::changelog(QString minVersion = "", QString maxVersion = ""). This function would allow you to show a changelog between two explicitly defined versions. By default, it’d show all releases. 2) You can store the currently installed version in your application’s settings when it starts. On next startup this will give you the previously installed version. If the previously installed version is different from the current version, you can call updateDialog.showChangelog(previousVersion, currentVersion)

    Let me know what you think and I’ll add this feature asap 👍

  2. pentacent repo owner

    I’ve now added the new method, I would recommend you use UpdateDialog::setPreviousVersion(), like so:

    void Updater::showChangelog() const
    {
        auto changelogDialog = new dblsqd::UpdateDialog(feed, dblsqd::UpdateDialog::ManualChangelog);
        changelogDialog->setPreviousVersion(/*PREVIOUS VERSION GOES HERE*/);
        changelogDialog->show();
    }
    
  3. Log in to comment