new message model #347
No reviewers
Labels
No Label
1app
2 apps
accessibility
android
before-beta
bug
duplicate
enhancement
first-contact
fixed
help wanted
infrastructure
invalid
low-priority
must-fix
needs testing
nice-to-have
question
tor
user-feedback
wontfix
No Milestone
No Assignees
4 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/ui#347
Loading…
Reference in New Issue
No description provided.
Delete Branch "mm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/ui/658
@ -4,3 +4,3 @@
require (
cwtch.im/cwtch v0.4.1
cwtch.im/cwtch v0.4.2-0.20201016053957-1933fb703fb0
will need to cut a new release in Cwtch and update this...
@ -41,1 +43,4 @@
func main() {
peer.DefaultEventsToHandle = []event.Type{
event.EncryptedGroupMessage,
//event.NewMessageFromPeer,
delete
@ -21,0 +21,4 @@
onRowsInserted: {
if (messagesListView.atYEnd) thymer.running = true
//todo: this won't fire for non-active convos
this still a todo?
it's a bugfix i preserved. created #348 to track it
bug*
Wow QT/QML just makes this process so seamless -_-;
@ -19,3 +19,3 @@
linux_build:
date
qtdeploy -qt_version "5.13.0" build linux 2>&1 | tee qtdeploy.log | pv
qtdeploy -docker -qt_version "5.13.0" build linux 2>&1 | tee qtdeploy.log | pv
delete -docker
@ -1,188 +0,0 @@
cwtch.im/cwtch v0.3.10 h1:akrIwsc1KnLbT3K6ZIFkhmA7kI62L03EWna7Ul1vszU=
did you delete the entire go.sum?
@ -9,3 +9,3 @@
)
// Terrible, to be replaced when proper profile/password management comes in ~ 0.2
// really awesome but nevertheless to be replaced when proper profile/password management comes in ~ 0.2
less accurate, it's now just the default password used in cases of "no encryption selected" for profiles and for the globals.ui file, so its... "safe"ish
@ -120,2 +118,4 @@
_ func(onion string) `signal:"storeHistoryForPeer,auto"`
_ func(onion string) `signal:"deleteHistoryForPeer,auto"`
// chat
_ func(mID string) `slot:"acktest,auto"`
acktest?
@ -0,0 +123,4 @@
} else {
contact := the.Peer.GetContact(this.Handle())
if this.Handle() == "" || the.Peer == nil || contact == nil {
modelmsg = model.Message{Message:"oops test hi uhhhhh :/"}
error?
@ -0,0 +125,4 @@
if this.Handle() == "" || the.Peer == nil || contact == nil {
modelmsg = model.Message{Message:"oops test hi uhhhhh :/"}
} else if idx >= len(contact.Timeline.Messages) {
log.Errorf("this shouldnt happen")
modelmsg = someDummy template? otherwise the return statement below will segfault?
@ -283,0 +295,4 @@
this.gcd.TimelineInterface.RequestEIR()
}
func (this *manager) StoreAndNotify(pere peer.CwtchPeer, onion string, messageTxt string, sent time.Time, profileOnion string) {
pere
typono it's the variable name version of Père aka Father CwtchPeer, preventer of naming conflicts with the peer library
@ -283,0 +298,4 @@
func (this *manager) StoreAndNotify(pere peer.CwtchPeer, onion string, messageTxt string, sent time.Time, profileOnion string) {
this.gcd.DoIfProfileElse(this.profile, func() {
this.gcd.DoIfConversationElse(onion, func() {
updateLastReadTime(onion)
Re: the comment below, since it's time based, maybe this call to updateLastReadTime() should be called after the message is added since num message new is calculated based on time? and if its updated before the message is added..
👍
@ -283,0 +303,4 @@
pere.StoreMessage(onion, messageTxt, sent)
this.gcd.TimelineInterface.RequestEIR()
}, func() {
updateLastReadTime(onion)
updateLastReadTime(onion) - sets the conversation's last read time to now (shouldbe called when the conversation is opened and or open, clearing notifications. we do it at Load messages so all the old ones aren't 1000 notifications in the conversation row bubble. but this is the else? so the conversation isn't open, so we dont want to update the lastReadTime here right?
yep you're right good catch (i was thinking of it as "updateMostRecentMessageArrivalTime" for some reason)
@ -200,2 +212,4 @@
engine.RootContext().SetContextProperty("gcd", gcd)
gcd.TimelineInterface = ui.NewMessageModel(nil)
gcd.TimelineInterface.SetHandle("66b46c88c1475de1819af2a95d39548d")
?
@ -56,0 +89,4 @@
Rectangle {
opacity: 1
width: childrenRect.width + 66
Most of the numbers in qml all tediuslyget * gcd.themeScale so the whole ui should scale appropriately
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/ui/677
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/ui/679
WIP: new message modelto new message modelLGTM
@ -9,3 +9,3 @@
)
// Terrible, to be replaced when proper profile/password management comes in ~ 0.2
// foundation block of the entire app. critical. never change, only obey
thumbs up