Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
angular
twitter-archive
Commits
8b548a24
Commit
8b548a24
authored
Nov 05, 2018
by
Zéfling
🎨
Browse files
Unselect current month on quit
parent
817e7f2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/tweets/tweets-calendar.component.ts
View file @
8b548a24
...
...
@@ -42,15 +42,14 @@ export class TweetsCalendarComponent implements OnInit, OnDestroy {
}
ngOnDestroy
()
{
this
.
unselectCurrentMouth
();
for
(
const
l
of
this
.
listener
)
{
l
.
unsubscribe
();
}
}
show
(
month
:
TweetsCalendar
)
{
if
(
this
.
month
)
{
this
.
month
.
selected
=
false
;
}
this
.
unselectCurrentMouth
();
this
.
month
=
month
;
this
.
month
.
selected
=
true
;
...
...
@@ -112,4 +111,10 @@ export class TweetsCalendarComponent implements OnInit, OnDestroy {
testVideo
(
medias
:
TweetMedia
[]):
boolean
{
return
medias
&&
medias
[
0
].
media_url_https
.
match
(
/.*
\/(
tweet_video_thumb|ext_tw_video_thumb
)\/
.*/
)
!==
null
;
}
private
unselectCurrentMouth
()
{
if
(
this
.
month
)
{
this
.
month
.
selected
=
false
;
}
}
}
Write
Preview
Supports
Markdown
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