-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3771 mark post as reply #3778
3771 mark post as reply #3778
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,8 +206,8 @@ fun TimelineStatusWithAccount.toViewData(moshi: Moshi, isDetailed: Boolean = fal | |
// no url for reblogs | ||
url = null, | ||
account = this.reblogAccount!!.toAccount(moshi), | ||
inReplyToId = null, | ||
inReplyToAccountId = null, | ||
inReplyToId = status.inReplyToId, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be consistent (a boost can also be a reply). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But the boost itself is not the reply, right? The actionable status is the reply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is boosted ("status") can be a reply (too). This info is "unused". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see now, this is here as a hack to populate the inreplyto timeline account of the concrete statusviewdata when it's a boost of a reply. |
||
inReplyToAccountId = status.inReplyToAccountId, | ||
reblog = reblog, | ||
content = "", | ||
// lie but whatever? | ||
|
@@ -269,6 +269,7 @@ fun TimelineStatusWithAccount.toViewData(moshi: Moshi, isDetailed: Boolean = fal | |
} | ||
return StatusViewData.Concrete( | ||
status = status, | ||
inReplyToAccount = this.inReplyToAccount?.toAccount(moshi), | ||
isExpanded = this.status.expanded, | ||
isShowingContent = this.status.contentShowing, | ||
isCollapsed = this.status.contentCollapsed, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Copyright 2023 Tusky Contributors | ||
* | ||
* This file is a part of Tusky. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under the terms of the | ||
* GNU General Public License as published by the Free Software Foundation; either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even | ||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
* Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with Tusky; if not, | ||
* see <http://www.gnu.org/licenses>. */ | ||
|
||
package com.keylesspalace.tusky.db | ||
|
||
import androidx.room.Dao | ||
import androidx.room.Query | ||
|
||
@Dao | ||
interface TimelineAccountDao { | ||
@Query("SELECT * FROM TimelineAccountEntity WHERE serverId = :id") | ||
suspend fun get(id: String): TimelineAccountEntity? | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to use
status.getActionable
here, and on line 90?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was searching for some time for the right location with the right information.
"actionable" was not it if I remember correctly.
It is working and plausible at the moment.
(Would need to look deep(er) into the code if you want me to be 100% certain about this.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, the inreplyto timeline account is only available on status, but without the timeline type mapper change, the correct thing to check for the inreplyto id is the actionable status. (And if
status.getActionable().getInReplyToId()
is nonnull, thenstatus.getInReplyToAccount()
will be as well.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the meaning of "actionable" in current code?
I see that it only has a value if "reblog" is true (Status.kt:59), so the thinking is probably "the item the action was taken for"?
(The "reply stuff" I have aligned more with the extsting "inReplyToAccountId".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my understanding is that the "outer" status is the boost itself, and the actionable status is the status that was boosted