Conversation
…reshold, but preference dialog doesn't get updated.
…decimal placs to maximum HBD display
| const cls = `entry-list-item ${promoted ? "promoted-item" : ""} ${global.filter}`; | ||
|
|
||
| const self_vote_entry = entry.active_votes.find((x) => x.voter == entry.author); | ||
| const self_vote = self_vote_entry ? self_vote_entry.rshares : false; |
There was a problem hiding this comment.
const selfVote = self_vote_entry?.rshares ?? false;
| const self_vote_entry = entry.active_votes.find((x) => x.voter == entry.author); | ||
| const self_vote = self_vote_entry ? self_vote_entry.rshares : false; | ||
| const hp_portion = 100 * (1 - entry.percent_hbd / 20000); | ||
| const max_payout: number = parseFloat(entry.max_accepted_payout); |
| <div className="app" title={app}> | ||
| <Tsx k="entry.via-app" args={{ app: appShort }}> | ||
| <a href="/faq#source-label" /> | ||
| </Tsx> |
There was a problem hiding this comment.
I guess <a href="/faq#source-label">{_t('entry.via-app', { app: appShort })}</a> much easier
| // @ts-ignore | ||
| (x) => x.voter == entry.author | ||
| ); | ||
| const self_vote = self_vote_entry ? true : false; |
There was a problem hiding this comment.
const selfVote = !!selfVoteEntry
| showSelfVoteChanged = (e: React.ChangeEvent<typeof FormControl & HTMLInputElement>) => { | ||
| const { setShowSelfVote } = this.props; | ||
| const { value } = e.target; | ||
| console.log(value); |
| try { | ||
| setLowRewardThreshold(JSON.parse(value)); | ||
| } catch (e) { | ||
| console.log(value, "Couldn't get it done boss"); |
There was a problem hiding this comment.
We have a error function that will show an alert on the bottom right side of viewport. Please use it instead
There was a problem hiding this comment.
Error message not meaningful
| } | ||
| this.showSelfVoteChanged = this.showSelfVoteChanged.bind(this); | ||
| this.showRewardSplitChanged = this.showRewardSplitChanged.bind(this); | ||
| this.lowRewardThresholdChanged = this.lowRewardThresholdChanged.bind(this); |
There was a problem hiding this comment.
Why you did this? Arrow functions already have a current context
|
Hello! Thanks for the feedback. The SNAP files are generated by the yarn
test process. So, yes it seems to me that the Object text is
unnecessary but will the tests work if you remove them? You're right,
arrow functions already have the context put in. I'll also change these to
"camelCase".
Thank you again for your valuable input.
…On Thu, Dec 8, 2022 at 4:18 AM Ildar Timerbaev ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/common/components/preferences/index.tsx
<#1137 (comment)>
:
> @@ -114,6 +145,10 @@ export class Preferences extends BaseComponent<Props, State> {
if (use_system_theme) {
theme = "system";
}
+ this.showSelfVoteChanged = this.showSelfVoteChanged.bind(this);
+ this.showRewardSplitChanged = this.showRewardSplitChanged.bind(this);
+ this.lowRewardThresholdChanged = this.lowRewardThresholdChanged.bind(this);
Why you did this? Arrow functions already have a current context
—
Reply to this email directly, view it on GitHub
<#1137 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUVO5MJN63A56FI3Z2NOYDWMGDTRANCNFSM6AAAAAASRMWPPY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
@shawnpringle I would prefer bit discreet design to show these info. Can you check mobile view in posts, there we have Also to discuss further fundamental of these features, here are few arguments:
|
I'll be adding these features:
show whether a post was self-voted, how its reward will be split, and when to display what the reward limit is.
Sometimes it is interesting to some to see whether the user has self-voted a post. Whether they are powering up 100% or whether they have limited their payout to some small value.
These are set in the site wide defaults file:
"showSelfVote": true, "showRewardSplit": true, "lowRewardThreshold": 1000000000
For example, if you set lowRewardThreshold to 1000, it wont show unless the post is restricted to 1000 HBD or to some other lower value.
See also: https://www.proofofbrain.blog/hive-150329/@leprechaun/show-self-vote-maximum-payout-hive-150329