package com.auto.clicker.autoclicker.util;

import android.content.Context;

public class PrefUtils {
    private static final String PREF_NAME = "app_prefs";
    private static final String KEY_FLOATING_SHOWN = "floating_window_shown";

    public static void setFloatingShown(Context context, int shown) {
        context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE)
                .edit().putInt(KEY_FLOATING_SHOWN, shown).apply();
    }

    public static int getFloatingShown(Context context) {
        return context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE)
                .getInt(KEY_FLOATING_SHOWN, 0);
    }
}
