Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Freeze option to freeze icon packs #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions app/src/main/java/dev/ukanth/iconmgr/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class App extends Application {
private HistoryDao historyDao;

private FavDao favDao;


private BroadcastReceiver receiver;


Expand Down Expand Up @@ -56,6 +58,8 @@ public void onCreate() {

FavDatabase db3 = FavDatabase.getInstance(getApplicationContext());
favDao = db3.favDao();


}

public IPObjDao getIPObjDao() {
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/dev/ukanth/iconmgr/IconAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
Expand All @@ -30,6 +31,7 @@
import java.util.Date;
import java.util.List;


import dev.ukanth.iconmgr.dao.IPObj;
import dev.ukanth.iconmgr.dao.IPObjDao;
import dev.ukanth.iconmgr.dao.IPObjDatabase;
Expand Down Expand Up @@ -134,6 +136,7 @@ private void performAction(int which, IPObj currentItem) {
uninstall(ctx, currentItem);
break;


}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/dev/ukanth/iconmgr/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class MainActivity extends AppCompatActivity implements SearchView.OnQuer
private RecyclerView recyclerView;
private TextView emptyView;
private IconAdapter adapter;
private IPObjDao ipObjDao = App.getInstance().getIPObjDao();;
private IPObjDao ipObjDao = App.getInstance().getIPObjDao();
private List<IPObj> iconPacksList;
private SwipeRefreshLayout mSwipeLayout;
private MaterialDialog plsWait;
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/dev/ukanth/iconmgr/dao/IPObjDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public interface IPObjDao {
@Delete
void delete(IPObj user);

@Delete
void deletecurrent(IPObj ipObj);

@Query("DELETE FROM IPObj")
void deleteAll();

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<item>Open in Playstore</item>
<item>Launch</item>
<item>Uninstall</item>
<item>Freeze</item>
</string-array>


Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
<string name="searching">Searching</string>
<string name="select_launcher">Select Launcher to apply iconpack</string>
<string name="apply">Apply</string>
<string name="freeze">Freeze Icon Pack</string>
<string name="defreeze">Defreeze Icon Pack</string>
<string name="open">Open</string>
<string name="use_launcher_menu">Enable Launcher prompt</string>
</resources>