Add support for hashtag on user interface
Add migration to fix typo Add support for linking hashtags with posts Rework tag search page so it says a nicer message than page not found when no post use that tag Add new string to translation
This commit is contained in:
@@ -144,7 +144,7 @@ table! {
|
||||
tags (id) {
|
||||
id -> Int4,
|
||||
tag -> Text,
|
||||
is_hastag -> Bool,
|
||||
is_hashtag -> Bool,
|
||||
post_id -> Int4,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ use schema::tags;
|
||||
pub struct Tag {
|
||||
pub id: i32,
|
||||
pub tag: String,
|
||||
pub is_hastag: bool,
|
||||
pub is_hashtag: bool,
|
||||
pub post_id: i32
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct Tag {
|
||||
#[table_name = "tags"]
|
||||
pub struct NewTag {
|
||||
pub tag: String,
|
||||
pub is_hastag: bool,
|
||||
pub is_hashtag: bool,
|
||||
pub post_id: i32
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ impl Tag {
|
||||
pub fn from_activity(conn: &Connection, tag: Hashtag, post: i32) -> Tag {
|
||||
Tag::insert(conn, NewTag {
|
||||
tag: tag.name_string().expect("Tag::from_activity: name error"),
|
||||
is_hastag: false,
|
||||
is_hashtag: false,
|
||||
post_id: post
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user