This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async subscribeToUnreadMessagesChanges(userId: string, onChange: (change: boolean) => void) { | |
const watch = await this.roomRepository.watchByUserId(userId); | |
watch.on('change', (change) => { | |
onChange( | |
change.fullDocument?.content && | |
!change.fullDocument?.read && | |
change.fullDocument?.last_sender_id !== userId, | |
); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.heart { | |
animation: heartbeat 1s infinite; // our heart has infinite heartbeat :) | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes heartbeat { | |
0% { | |
transform: scale( 1 ); | |
} | |
20% { | |
transform: scale( 1.25 ) | |
translateX(5%) | |
translateY(5%); | |
} | |
40% { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.heart { | |
background-color: red; | |
display: inline-block; | |
height: 50px; | |
margin: 0 10px; | |
position: relative; | |
top: 0; | |
transform: rotate(-45deg); | |
position: absolute; | |
left: 45%; top: 45%; |