New Cwtch Library Integration #258
|
@ -1,4 +1,5 @@
|
|||
import 'dart:convert';
|
||||
import 'package:cwtch/main.dart';
|
||||
import 'package:cwtch/models/message.dart';
|
||||
import 'package:cwtch/models/profileservers.dart';
|
||||
import 'package:cwtch/models/servers.dart';
|
||||
|
@ -365,6 +366,8 @@ class CwtchNotifier {
|
|||
case "FileDownloaded":
|
||||
profileCN.getProfile(data["ProfileOnion"])?.downloadMarkFinished(data["FileKey"], data["FilePath"]);
|
||||
break;
|
||||
case "ImportingProfileEvent":
|
||||
break;
|
||||
default:
|
||||
EnvironmentConfig.debugLog("unhandled event: $type");
|
||||
}
|
||||
|
|
|
@ -631,7 +631,7 @@ class ContactInfoState extends ChangeNotifier {
|
|||
set newMarker(int newVal) {
|
||||
// only unreadMessages++ can set newMarker = 1;
|
||||
// avoids drawing a marker when the convo is already open
|
||||
if (newVal > 1) {
|
||||
if (newVal >= 1) {
|
||||
this._newMarker = newVal;
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
var mark = Provider.of<ContactInfoState>(context).newMarker;
|
||||
if (mark > 0 &&
|
||||
Provider.of<ContactInfoState>(context).messageCache.length > mark &&
|
||||
Provider.of<ContactInfoState>(context).messageCache[mark]?.metadata.messageID == Provider.of<MessageMetadata>(context).messageID) {
|
||||
Provider.of<ContactInfoState>(context).messageCache[mark - 1]?.metadata.messageID == Provider.of<MessageMetadata>(context).messageID) {
|
||||
return Column(crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, children: [Align(alignment: Alignment.center, child: _bubbleNew()), mr]);
|
||||
} else {
|
||||
return mr;
|
||||
|
|
Loading…
Reference in New Issue