mirror of
https://github.com/yang991178/fluent-reader.git
synced 2025-01-30 17:15:20 +01:00
mark read when open from iid
This commit is contained in:
parent
37ab1931d5
commit
a7e00f5e42
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fluent-reader",
|
||||
"version": "0.5.1",
|
||||
"version": "0.6.0",
|
||||
"description": "A simplistic, modern desktop RSS reader",
|
||||
"main": "./dist/electron.js",
|
||||
"scripts": {
|
||||
|
@ -11,7 +11,9 @@ if (!process.mas) {
|
||||
app.quit()
|
||||
}
|
||||
}
|
||||
|
||||
if (!app.isPackaged) app.setAppUserModelId(process.execPath)
|
||||
else if (process.platform === "win32") app.setAppUserModelId("me.hyliu.fluentreader")
|
||||
|
||||
let restarting = false
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { RSSItem, ItemActionTypes, FETCH_ITEMS, fetchItems } from "./item"
|
||||
import { ActionStatus, AppThunk, getWindowBreakpoint } from "../utils"
|
||||
import { INIT_FEEDS, FeedActionTypes, ALL, initFeeds } from "./feed"
|
||||
import { SourceGroupActionTypes, UPDATE_SOURCE_GROUP, ADD_SOURCE_TO_GROUP, DELETE_SOURCE_GROUP, REMOVE_SOURCE_FROM_GROUP, REORDER_SOURCE_GROUPS } from "./group"
|
||||
import { PageActionTypes, SELECT_PAGE, PageType, selectAllArticles, showItem } from "./page"
|
||||
import { PageActionTypes, SELECT_PAGE, PageType, selectAllArticles, showItemFromId } from "./page"
|
||||
import { getCurrentLocale } from "../settings"
|
||||
import locales from "../i18n/_locales"
|
||||
import * as db from "../db"
|
||||
@ -222,7 +222,7 @@ export function pushNotification(item: RSSItem): AppThunk {
|
||||
notification.onclick = () => {
|
||||
if (!getState().app.settings.display) {
|
||||
window.utils.focus()
|
||||
dispatch(showItem(null, item))
|
||||
dispatch(showItemFromId(item._id))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ export function itemReducer(
|
||||
case TOGGLE_HIDDEN: {
|
||||
return {
|
||||
...state,
|
||||
[action.item._id]: applyItemReduction(action.item, action.type)
|
||||
[action.item._id]: applyItemReduction(state[action.item._id], action.type)
|
||||
}
|
||||
}
|
||||
case MARK_ALL_READ: {
|
||||
|
@ -97,6 +97,7 @@ export function showItemFromId(iid: string): AppThunk {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState()
|
||||
const item = state.items[iid]
|
||||
if (!item.hasRead) dispatch(markRead(item))
|
||||
if (item) dispatch(showItem(null, item))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user