更新动态详情页
- 动态详情页UI更新 - 动态详情页新增删除功能 - 新增下拉菜单组件 - 消息列表UI更新 - 搜索页UI更新 - 图片查看器移除状态栏黑色遮罩 - 更新API,新增删除动态接口 - 更新MomentService,新增删除动态方法 - 更新Moment类,新增删除动态方法 - 更新NewPostViewModel,发布动态后刷新动态列表 - 更新MomentViewModel,
This commit is contained in:
@@ -148,6 +148,11 @@ interface MomentService {
|
||||
* @param id 动态ID
|
||||
*/
|
||||
suspend fun unfavoriteMoment(id: Int)
|
||||
|
||||
/**
|
||||
* 删除动态
|
||||
*/
|
||||
suspend fun deleteMoment(id: Int)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
import retrofit2.Response
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.DELETE
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Multipart
|
||||
import retrofit2.http.PATCH
|
||||
@@ -251,4 +252,9 @@ interface RiderProAPI {
|
||||
@POST("register/google")
|
||||
suspend fun registerWithGoogle(@Body body: GoogleRegisterRequestBody): Response<AuthResult>
|
||||
|
||||
@DELETE("post/{id}")
|
||||
suspend fun deletePost(
|
||||
@Path("id") id: Int
|
||||
): Response<Unit>
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user