Drop the twitter lingo

This commit is contained in:
Christian Muehlhaeuser 2019-05-02 10:37:04 +02:00
parent f1e81747da
commit 75bb63964b
No known key found for this signature in database
GPG key ID: 3CF9FA45CA1EBB7E
10 changed files with 37 additions and 37 deletions

View file

@ -147,7 +147,7 @@ func (mod *Account) handleStreamEvent(item interface{}) {
if status.Notification.Status != nil {
ev = accounts.MessageEvent{
Account: "mastodon",
Name: "tweet",
Name: "post",
Notification: true,
Post: accounts.Post{
@ -200,7 +200,7 @@ func (mod *Account) handleStreamEvent(item interface{}) {
case *mastodon.UpdateEvent:
ev := accounts.MessageEvent{
Account: "mastodon",
Name: "tweet",
Name: "post",
Post: accounts.Post{
MessageID: string(status.Status.ID),
Body: status.Status.Content,

View file

@ -12,7 +12,7 @@ import (
"github.com/muesli/chirp/accounts/mastodon"
)
// reply is used to post a new tweet
// reply is used to post a new message
// if replyid is > 0, it's send as a reply
func reply(replyid string, message string) {
var err error
@ -60,15 +60,15 @@ func runApp(config Config) {
// setupMastodon starts a new Mastodon client and sets up event handling & models for it
func setupMastodon(config Account) {
tc = mastodon.NewAccount(config.Username, config.Password, config.Instance, config.ClientID, config.ClientSecret)
tweetModel := NewMessageModel(nil)
postModel := NewMessageModel(nil)
notificationModel := NewMessageModel(nil)
accountBridge.SetUsername("Logging in...")
accountBridge.SetMessages(tweetModel)
accountBridge.SetMessages(postModel)
accountBridge.SetNotifications(notificationModel)
evchan := make(chan interface{})
go handleEvents(evchan, tweetModel, notificationModel)
go handleEvents(evchan, postModel, notificationModel)
go func() {
tc.Run(evchan)
}()

View file

@ -7,11 +7,11 @@ ColumnLayout {
property string name
property variant messageModel
TweetList {
MessageList {
Layout.fillHeight: true
Layout.fillWidth: true
id: tweetView
id: messagePane
anchors.margins: 16
model: messageModel

View file

@ -155,22 +155,22 @@ RowLayout {
source: "images/reply.svg"
sourceSize.height: 16
onClicked: function () {
tweetPopup.name = name
tweetPopup.messageid = messageid
tweetPopup.author = author
tweetPopup.avatar = avatar
tweetPopup.body = body
tweetPopup.createdat = createdat
tweetPopup.posturl = posturl
tweetPopup.actor = actor
tweetPopup.actorname = actorname
tweetPopup.reply = reply
tweetPopup.replytoid = replytoid
tweetPopup.replytoauthor = replytoauthor
tweetPopup.forward = forward
tweetPopup.mention = mention
tweetPopup.like = like
tweetPopup.open()
messagePopup.name = name
messagePopup.messageid = messageid
messagePopup.author = author
messagePopup.avatar = avatar
messagePopup.body = body
messagePopup.createdat = createdat
messagePopup.posturl = posturl
messagePopup.actor = actor
messagePopup.actorname = actorname
messagePopup.reply = reply
messagePopup.replytoid = replytoid
messagePopup.replytoauthor = replytoauthor
messagePopup.forward = forward
messagePopup.mention = mention
messagePopup.like = like
messagePopup.open()
}
}
ImageButton {

View file

@ -14,8 +14,8 @@ ApplicationWindow {
minimumHeight: 480
Item {
TweetPopup {
id: tweetPopup
MessagePopup {
id: messagePopup
width: 480
height: 300
x: mainWindow.width / 2 - width / 2
@ -40,7 +40,7 @@ ApplicationWindow {
Component {
id: messagesDelegate
TweetDelegate { }
MessageDelegate { }
}
header: ToolBar {
@ -156,8 +156,8 @@ ApplicationWindow {
switch (model.sid) {
case 0:
tweetPopup.messageid = 0
tweetPopup.open()
messagePopup.messageid = 0
messagePopup.open()
break
case 1:
Qt.quit()
@ -191,7 +191,7 @@ ApplicationWindow {
columnSpacing: 0
rowSpacing: 0
TweetView {
MessagePane {
Layout.row: 0
Layout.column: 0
@ -199,7 +199,7 @@ ApplicationWindow {
messageModel: accountBridge.messages
}
TweetView {
MessagePane {
Layout.row: 0
Layout.column: 1

View file

@ -4,5 +4,5 @@ QtObject {
property string username: "mueslix"
property string avatar: "https://pbs.twimg.com/profile_images/813451113970208768/n_dO5t1L_normal.jpg"
property ListModel messages: tweetModel
property ListModel messages: postModel
}

View file

@ -6,7 +6,7 @@ ListModel {
messageid: "901223685058703361"
author: "mueslix"
avatar: "https://pbs.twimg.com/profile_images/779041781413507072/TaqJsdzS_normal.jpg"
body: "This is a very long test tweet, that should probably be word-wrapped."
body: "This is a very, very long test post, that should probably get word-wrapped. But does it work?"
createdat: "now"
actor: ""
actorname: ""
@ -40,7 +40,7 @@ ListModel {
messageid: "901223685058703361"
author: "dummy"
avatar: "https://pbs.twimg.com/profile_images/707382834827120640/R-Eb9YZB_normal.jpg"
body: "This is a very short test tweet with a link: <a href=\"http://chris.de\">http://chris.de</a>"
body: "This is a very short test post with a link: <a href=\"http://chris.de\">http://chris.de</a>"
createdat: "now"
actor: "mueslix"
actorname: "Christian Muehlhaeuser"
@ -57,7 +57,7 @@ ListModel {
messageid: "901223685058703361"
author: "anotheruser"
avatar: "https://pbs.twimg.com/profile_images/658723533845954560/noXJEv_a_normal.jpg"
body: "Yet another test tweet. Lorem Ipsum Yada Yada @mueslix"
body: "Yet another test post. Lorem Ipsum Yada Yada @mueslix"
createdat: "now"
actor: "mueslix"
actorname: "Christian Muehlhaeuser"
@ -70,9 +70,9 @@ ListModel {
media: ""
}
ListElement {
name: "This Tweeter"
name: "This Poster"
messageid: "901223685058703361"
author: "tweety"
author: "posty"
avatar: "https://pbs.twimg.com/profile_images/293948630/twitter_icon_normal.JPG"
body: "I can't come up with any more mocking data now, really. This is enough."
createdat: "now"