Skip to content

Commit

Permalink
use abstract as title of top threads
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Oct 17, 2023
1 parent 7e8ee20 commit 8b106a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ForumViewModel : ViewModel() {
TiebaThread(
p.id,
p.firstPostId,
p.title,
p.title.ifEmpty { if (p.isTop == 1) p.abstractsList.joinToString(" ") { it.text } else "" },
users[p.authorId] ?: User(),
p.firstPostContentList.toPostContent(),
Date(p.lastTimeInt.toLong() * 1000),
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/protobuf/tbclient/Abstract.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// tbclient.Agree
syntax = "proto3";
option java_package = "tbclient";

message Abstract {
int32 type = 1;
string text = 2;
string link = 3;
string src = 4;
string un = 5;
string during_time = 6;
string voice_md5 = 7;
}
2 changes: 2 additions & 0 deletions app/src/main/protobuf/tbclient/ThreadInfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "PollInfo.proto";
import "PbContent.proto";
import "Agree.proto";
import "Media.proto";
import "Abstract.proto";

message ThreadInfo {
int64 id = 1;
Expand All @@ -17,6 +18,7 @@ message ThreadInfo {
int32 is_good = 10;
int32 is_voice_thread = 15;
User author = 18;
repeated Abstract abstracts = 21;
repeated Media media = 22;
int32 thread_type = 26;
int64 fid = 27;
Expand Down

0 comments on commit 8b106a2

Please sign in to comment.