File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -35,4 +35,6 @@ class NotificationModel {
35
35
36
36
extension NotificationModelHelper on NotificationModel {
37
37
UserModel get user => UserModel .fromJson (this .data);
38
+
39
+ DateTime get timeStamp => DateTime .tryParse (this .updatedAt ?? this .createdAt);
38
40
}
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class AuthState extends AppState {
45
45
if (isSignInWithGoogle) {
46
46
_googleSignIn.signOut ();
47
47
Utility .logEvent ('google_logout' );
48
+ isSignInWithGoogle = false ;
48
49
}
49
50
_firebaseAuth.signOut ();
50
51
notifyListeners ();
Original file line number Diff line number Diff line change @@ -75,15 +75,8 @@ class NotificationState extends AppState {
75
75
var model = NotificationModel .fromJson (tweetKey, map);
76
76
addNotificationList (model);
77
77
});
78
- _notificationList.sort ((x, y) {
79
- if (x.updatedAt != null && y.updatedAt != null ) {
80
- return DateTime .parse (y.updatedAt)
81
- .compareTo (DateTime .parse (x.updatedAt));
82
- } else if (x.updatedAt != null ) {
83
- return 1 ;
84
- } else
85
- return 0 ;
86
- });
78
+ _notificationList
79
+ .sort ((x, y) => y.timeStamp.compareTo (x.timeStamp));
87
80
}
88
81
}
89
82
loading = false ;
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class LinkPreview extends StatelessWidget {
84
84
),
85
85
child: CachedNetworkImage (
86
86
imageUrl: webInfo.image,
87
- fit: BoxFit .contain ,
87
+ fit: BoxFit .cover ,
88
88
),
89
89
),
90
90
),
You can’t perform that action at this time.
0 commit comments