Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/src/models/comment_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@ class Comment extends CommentRef
/// Is this [Comment] archived.
bool get archived => data!['archived'];

// TODO(bkonyi): update this definition.
// RedditorRef get author => reddit.redditor(data['author']);

/// The author's flair text, if set.
///
/// Returns `null` if the author does not have any flair text set.
Expand Down
6 changes: 5 additions & 1 deletion lib/src/models/mixins/voteable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:async';

import 'package:draw/src/api_paths.dart';
import 'package:draw/src/base.dart';
import 'package:draw/src/models/redditor.dart';

enum VoteState {
none,
Expand All @@ -28,7 +29,10 @@ int _voteStateToIndex(VoteState vote) {
/// A mixin which provides voting functionality for [Comment] and [Submission].
mixin VoteableMixin implements RedditBaseInitializedMixin {
/// The author of the item.
String get author => data!['author'];
// String get author => data!['author'];

/// Returns the [Redditor] associated with this item.
RedditorRef get author => RedditorRef.name(reddit, data!['author']);

/// The body of the item.
///
Expand Down