Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/scripts/models/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const enum SourceTextDirection {
export class RSSSource {
sid: number
url: string
originUrl?: string
iconurl?: string
name: string
openTarget: SourceOpenTarget
Expand All @@ -60,6 +61,7 @@ export class RSSSource {

static async fetchMetaData(source: RSSSource) {
let feed = await parseRSS(source.url)
source.originUrl = feed.link
if (!source.name) {
if (feed.title) source.name = feed.title.trim()
source.name = source.name || intl.get("sources.untitled")
Expand Down Expand Up @@ -426,8 +428,8 @@ export function updateFavicon(
sids = sids.filter(sid => sid in initSources)
}
const promises = sids.map(async sid => {
const url = initSources[sid].url
let favicon = (await fetchFavicon(url)) || ""
const { originUrl, url }= initSources[sid]
let favicon = (await fetchFavicon(originUrl || url)) || ""
const source = getState().sources[sid]
if (
source &&
Expand Down