Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #118 from xs9627/master
Browse files Browse the repository at this point in the history
v1.2.2 release
  • Loading branch information
xs9627 committed May 15, 2020
2 parents 7794521 + fedc2c0 commit 67bc41b
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 237 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.2.2] - 2020-05-15
### Changed
- Fix scroll caused by middle click
## [1.2.1] - 2020-04-08
### Added
- Middle click to open in new tab
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Install in chrome web store: https://chrome.google.com/webstore/detail/feedpop-s
Load unpacked extension manually: https://github.com/xs9627/feedpop/releases

[CHANGELOG]: ./CHANGELOG.md
[version-badge]: https://img.shields.io/badge/version-1.2.1-blue.svg
[version-badge]: https://img.shields.io/badge/version-1.2.2-blue.svg
177 changes: 94 additions & 83 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.9",
"@material-ui/core": "^4.9.14",
"@material-ui/icons": "^4.9.1",
"classnames": "^2.2.6",
"i": "^0.3.6",
"i18next": "^19.3.4",
"i18next-browser-languagedetector": "^4.0.2",
"i18next": "^19.4.4",
"i18next-browser-languagedetector": "^4.1.1",
"lodash.range": "^3.2.0",
"mdi-material-ui": "^6.13.2",
"npm": "^6.14.4",
"mdi-material-ui": "^6.14.0",
"npm": "^6.14.5",
"qrcode.react": "^1.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-i18next": "^11.3.4",
"react-i18next": "^11.4.0",
"react-scripts": "^3.4.1",
"react-spring": "^8.0.27",
"react-transition-group": "^4.3.0",
"react-use-gesture": "^7.0.11",
"react-transition-group": "^4.4.1",
"react-use-gesture": "^7.0.15",
"reactour": "https://github.com/xs9627/reactour/tarball/test",
"redux-thunk": "^2.3.0",
"rss-parser": "https://github.com/xs9627/rss-parser/tarball/master",
"rss-parser": "https://github.com/xs9627/rss-parser/tarball/v3.8.0.0",
"sinon-chrome": "^3.0.1",
"styled-components": "^5.1.0",
"typeface-roboto-material": "0.0.1",
"uuid": "^7.0.3"
"uuid": "^8.0.0"
},
"scripts": {
"start": "react-app-rewired start",
Expand All @@ -39,7 +39,7 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"react-app-rewired": "^2.1.5",
"react-app-rewired": "^2.1.6",
"react-redux": "^7.2.0",
"redux": "^4.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"48": "icon48.png",
"128": "icon128.png"
},
"version": "1.2.1"
"version": "1.2.2"
}
7 changes: 4 additions & 3 deletions src/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* global RSSParser */
import 'rss-parser/dist/rss-parser.min.js';
import Parser from 'rss-parser/dist/rss-parser.min.js';
import * as types from "../constants/action-types";
import ChromeUtil from '../utils/ChromeUtil';

const fetchFeed = url => {
return new Promise((resolve, reject) => {
let parser = new RSSParser();
let parser = new Parser({
timeout: 30000,
});
parser.parseURL(url, (err, feed) => {
if(err) {
reject(err);
Expand Down
1 change: 1 addition & 0 deletions src/components/FeedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ const FeedList = props => {
if (e.nativeEvent.button === 1) {
!feed.isRead && props.setFeedReadStatus(feed.channelId || currentChannelId, feed.readerId, true);
ChromeUtil.openTab(feed.link, false)
e.preventDefault()
}
}}
onContextMenu={e => handleItemContextMenu(e, feed)}
Expand Down
6 changes: 4 additions & 2 deletions src/globalMocker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { v4 as uuidv4 } from 'uuid';

/* global chrome */
chrome.runtime.getManifest.returns({version: "1.*.*"});
chrome.runtime.connect.returns({onMessage: { addListener: () => {}}});
Expand All @@ -13,7 +15,7 @@ const mockFeedItem = i => ({
"isoDate": new Date(new Date() - 1000 * 60 * 60 * i).toISOString(),
"link": `http://daily.zhihu.com/story/9664845-test-${i}`,
"pubDate": new Date(new Date() - 1000 * 60 * 60 * i).toISOString(),
"readerId": require('uuid/v4')(),
"readerId": uuidv4(),
"title": `从小到大,这些谣言让我深受其害-test-${i}`
});
const mockFeedItem2 = i => ({
Expand All @@ -23,7 +25,7 @@ const mockFeedItem2 = i => ({
"isoDate": new Date(new Date() - 1000 * 60 * 60 * i).toISOString(),
"link": `https://sourceforge.net/projects/arrow-os/files/arrow-9.x/whyred/Arrow-v9.0-whyred-OFFICIAL-20181210.zip/download-test-${i}`,
"pubDate": new Date(new Date() - 1000 * 60 * 60 * i).toISOString(),
"readerId": require('uuid/v4')(),
"readerId": uuidv4(),
"title": `/arrow-9.x/whyred/Arrow-v9.0-whyred-OFFICIAL-20181210.zip-test-${i}`
});

Expand Down
5 changes: 2 additions & 3 deletions src/reducers/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as types from "../constants/action-types";
import {ChannelFixedID} from "../constants/index";
import ChromeUtil from "../utils/ChromeUtil";
import { v4 as uuidv4 } from 'uuid';

const recentCount = 30;
const mergeFeed = (oldFeed, newFeed, keepHistoricFeeds) => {
const uuidv4 = require('uuid/v4');
if (oldFeed) {
const mergedItems = !keepHistoricFeeds ? [...oldFeed.items.filter(i => newFeed.items.some(j => i.link === j.link))] : [...oldFeed.items];
newFeed.items.forEach((ni, i) => {
Expand Down Expand Up @@ -194,13 +194,12 @@ const rootReducer = (state = initialState, action) => {
}
case types.ADD_CHANNEL: {
const { channel, feeds } = action.payload;
channel.id = require('uuid/v4')();
channel.id = uuidv4();
channel.unreadCount = feeds.items.length;
const splitedFeeds = splitFeedsToRecent(feeds);
const recentFeeds = [...state.recentFeeds, {channelId: channel.id, feed: splitedFeeds[0]}];
const updated = { recentFeeds, mergedFeed:splitedFeeds[1], channels: [...state.channels, channel], allUnreadCount: (state.allUnreadCount || 0) + channel.unreadCount };
feeds.items.sort((a, b) => new Date(b.isoDate) - new Date(a.isoDate));
const uuidv4 = require('uuid/v4');
feeds.items.forEach((item, i) => {
if (!item.readerId) {
item.readerId = uuidv4();
Expand Down
Loading

0 comments on commit 67bc41b

Please sign in to comment.