Enable/disable auto marking based on user setting
This commit is contained in:
parent
2b76c560c2
commit
d60b01faa3
3 changed files with 3 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ class App extends React.Component {
|
|||
timelineUrl={this.props.timelineUrl}
|
||||
categoriesUrl={this.props.categoriesUrl}
|
||||
timezone={this.props.timezone}
|
||||
autoMarking={this.props.autoMarking}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ class PostModal extends React.Component {
|
|||
const markPostRead = this.props.markPostRead;
|
||||
const token = Cookies.get('csrftoken');
|
||||
|
||||
// TODO set timer depending on user setting
|
||||
if (!post.read) {
|
||||
if (this.props.autoMarking && !post.read) {
|
||||
this.readTimer = setTimeout(markPostRead, 3000, post, token);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ if (page) {
|
|||
timelineUrl={timelineUrl.substring(1, timelineUrl.length - 4)}
|
||||
categoriesUrl={categoriesUrl.substring(1, categoriesUrl.length - 4)}
|
||||
timezone={settings.timezone}
|
||||
autoMarking={settings.autoMarking}
|
||||
/>
|
||||
</Provider>,
|
||||
page
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue