mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Show newly created comment
This commit is contained in:
		@@ -25,6 +25,18 @@ class CommentsHelper {
 | 
			
		||||
    return response.getObject()["commentID"];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Get a single comment from the server, specified by its [id]
 | 
			
		||||
  Future<Comment> getSingle(int id) async {
 | 
			
		||||
    final response = await APIRequest(
 | 
			
		||||
        uri: "comments/get_single",
 | 
			
		||||
        needLogin: true,
 | 
			
		||||
        args: {"commentID": id.toString()}).exec();
 | 
			
		||||
 | 
			
		||||
    if (response.code != 200) return null;
 | 
			
		||||
 | 
			
		||||
    return apiToComment(response.getObject());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Turn an API entry into a [Comment] object
 | 
			
		||||
  static Comment apiToComment(Map<String, dynamic> entry) {
 | 
			
		||||
    return Comment(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user