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

Shows changelog from last to n(version) #1

Open
PokerAsh opened this issue Oct 5, 2018 · 1 comment
Open

Shows changelog from last to n(version) #1

PokerAsh opened this issue Oct 5, 2018 · 1 comment

Comments

@PokerAsh
Copy link

PokerAsh commented Oct 5, 2018

My code:
ClickListener:

et_show_version1.setText("1.0.0")
et_show_version1.setOnClickListener { _ -> showChangelog(1, et_show_version1.text.toString()) }
et_show_version2.setText("1.0.1")
et_show_version2.setOnClickListener { _ -> showChangelog(2, et_show_version2.text.toString()) }
et_show_version3.setText("1.0.2")
et_show_version3.setOnClickListener { _ -> showChangelog(3, et_show_version3.text.toString()) }

showChangelog function:

private fun showChangelog(version: Int = Changelog.ALL_VERSIONS, versionName: String) {
        Changelog.createDialog(ctx = mActivity, versionCode = version, title = versionName).show()
    }

This shows me next:

  1. Shows all changelog(version: 1/2/3)
  2. Shows version: 2/3
  3. Shows version 3

Is that right? I just wanted to show to user, that changelog which he hit the button to.

@derlin
Copy link
Owner

derlin commented Oct 5, 2018

Hi, yes it is the intended behaviour. The idea was that most of the times, you want to display the latest log. After a while, though, the changelog becomes very big, hence the optional argument saying don't show version older than X.

This is not difficult to modify, but I don't know which of the two behaviours (show all versions after X or show version X) is the most common.

A better way would be to have two optional parameters, from and to, so we could express bounds ? I am thinking out loud now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants