Skip to content

Commit 650aca0

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into feature-more-pt2
2 parents e272575 + 19e2fc3 commit 650aca0

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

RedditSharp/Listing.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,20 @@ private void PageBack()
201201
if (LimitPerRequest != -1)
202202
{
203203
int limit = LimitPerRequest;
204-
205-
if (limit > MaximumLimit)
206-
{
207-
// If the limit is more than the maximum number of listings, adjust
208-
limit = MaximumLimit;
209-
}
210-
else if (Count + limit > MaximumLimit)
204+
if(MaximumLimit != -1)
211205
{
212-
// If a smaller subset of listings are needed, adjust the limit
213-
limit = MaximumLimit - Count;
206+
if (limit > MaximumLimit)
207+
{
208+
// If the limit is more than the maximum number of listings, adjust
209+
limit = MaximumLimit;
210+
}
211+
else if (Count + limit > MaximumLimit)
212+
{
213+
// If a smaller subset of listings are needed, adjust the limit
214+
limit = MaximumLimit - Count;
215+
}
214216
}
215-
217+
216218
if (limit > 0)
217219
{
218220
// Add the limit, the maximum number of items to be returned per page

RedditSharp/Things/Post.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ public Comment[] Comments
138138
[JsonProperty("subreddit")]
139139
public string SubredditName { get; set; }
140140

141+
[JsonProperty("archived")]
142+
public bool IsArchived { get; set; }
143+
141144
[JsonProperty("stickied")]
142145
public bool IsStickied { get; set; }
143146

0 commit comments

Comments
 (0)