Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FeedReader
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Open Source Software
FeedReader
Commits
3fdeaa27
Commit
3fdeaa27
authored
Nov 20, 2013
by
Timo Tegtmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed unstarring function
parent
ae16ebfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
indexeddb.js
src/source/logic/indexeddb.js
+9
-5
No files found.
src/source/logic/indexeddb.js
View file @
3fdeaa27
...
...
@@ -947,16 +947,13 @@ enyo.kind({
var
transaction
=
this
.
writeTransaction
([
"
feeds
"
,
"
stories
"
],
onSuccess
,
onFail
);
var
feeds
=
transaction
.
objectStore
(
"
feeds
"
);
var
stories
=
transaction
.
objectStore
(
"
stories
"
);
var
deltaNew
=
0
,
deltaUnread
=
0
;
var
self
=
this
;
var
req
=
stories
;
if
(
feed
.
feedType
>=
feedTypes
.
ftUnknown
)
{
req
=
req
.
index
(
"
fid
"
).
openCursor
(
this
.
boundOnly
(
feed
.
id
));
}
else
{
if
(
feed
.
feedType
==
feedTypes
.
ftStarred
)
{
feed
.
numNew
=
feed
.
numUnRead
=
0
;
feeds
.
put
(
self
.
cloneWhenNeeded
(
feed
,
Feed
));
}
req
=
req
.
openCursor
();
}
...
...
@@ -965,11 +962,18 @@ enyo.kind({
if
(
cursor
)
{
var
story
=
cursor
.
value
;
if
(
story
.
isStarred
)
{
if
(
story
.
isNew
)
deltaNew
++
;
if
(
!
story
.
isRead
)
deltaUnread
++
;
story
.
isStarred
=
false
;
stories
.
put
(
self
.
cloneWhenNeeded
(
story
,
Story
));
}
cursor
.
continue
();
}
}
else
{
var
feedupdater
=
enyo
.
bind
(
self
,
self
.
updateFeedCount
,
feeds
,
-
deltaUnread
,
-
deltaNew
);
feeds
.
index
(
"
feedType
"
).
get
(
feedTypes
.
ftStarred
).
onsuccess
=
feedupdater
;
}
};
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment