aboutsummaryrefslogblamecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostsUtils.java
blob: a56bf9c818283abb232210ef36d49703f5632c3a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                                                            
package ml.docilealligator.infinityforreddit.readpost;

import android.content.SharedPreferences;
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;

public class ReadPostsUtils {
    public static int GetReadPostsLimit(String accountName, SharedPreferences mPostHistorySharedPreferences) {
        if (mPostHistorySharedPreferences.getBoolean(accountName + SharedPreferencesUtils.READ_POSTS_LIMIT_ENABLED, true)) {
            return mPostHistorySharedPreferences.getInt(accountName + SharedPreferencesUtils.READ_POSTS_LIMIT, 500);
        } else {
            return -1;
        }
    }
}