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}
|
timelineUrl={this.props.timelineUrl}
|
||||||
categoriesUrl={this.props.categoriesUrl}
|
categoriesUrl={this.props.categoriesUrl}
|
||||||
timezone={this.props.timezone}
|
timezone={this.props.timezone}
|
||||||
|
autoMarking={this.props.autoMarking}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ class PostModal extends React.Component {
|
||||||
const markPostRead = this.props.markPostRead;
|
const markPostRead = this.props.markPostRead;
|
||||||
const token = Cookies.get('csrftoken');
|
const token = Cookies.get('csrftoken');
|
||||||
|
|
||||||
// TODO set timer depending on user setting
|
if (this.props.autoMarking && !post.read) {
|
||||||
if (!post.read) {
|
|
||||||
this.readTimer = setTimeout(markPostRead, 3000, post, token);
|
this.readTimer = setTimeout(markPostRead, 3000, post, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ if (page) {
|
||||||
timelineUrl={timelineUrl.substring(1, timelineUrl.length - 4)}
|
timelineUrl={timelineUrl.substring(1, timelineUrl.length - 4)}
|
||||||
categoriesUrl={categoriesUrl.substring(1, categoriesUrl.length - 4)}
|
categoriesUrl={categoriesUrl.substring(1, categoriesUrl.length - 4)}
|
||||||
timezone={settings.timezone}
|
timezone={settings.timezone}
|
||||||
|
autoMarking={settings.autoMarking}
|
||||||
/>
|
/>
|
||||||
</Provider>,
|
</Provider>,
|
||||||
page
|
page
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue