Skip to content

Commit

Permalink
RecentsAdapter: code improvements
Browse files Browse the repository at this point in the history
Signed-off-by: enricocid <[email protected]>
  • Loading branch information
enricocid committed Nov 24, 2022
1 parent 5a6e08a commit 585e62f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
9 changes: 3 additions & 6 deletions Credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@

### Libraries/dependencies/dev/support

- [Maximilian Keppeler](https://github.com/maxkeppeler) for beautiful [Color sheet](https://github.com/maxkeppeler/sheets/) library!

- [Square](https://github.com/square/) for [Moshi](https://github.com/square/moshi/) library!

- [Chris Banes](https://github.com/chrisbanes) for the awesome [Insetter](https://github.com/chrisbanes/insetter/) library!

- [Jnss98b](https://github.com/Jnss98b) for his support on different issues: [3](https://github.com/enricocid/VectorifyDaHome/issues/3), [4](https://github.com/enricocid/VectorifyDaHome/issues/4), [7](https://github.com/enricocid/VectorifyDaHome/issues/7),[8](https://github.com/enricocid/VectorifyDaHome/issues/8), [14](https://github.com/enricocid/VectorifyDaHome/issues/14), [16](https://github.com/enricocid/VectorifyDaHome/issues/16), [17](https://github.com/enricocid/VectorifyDaHome/issues/17)!

- [Cheng Wang](https://github.com/wangcheng) for [display cutout support fixes](https://github.com/enricocid/VectorifyDaHome/pull/46)
Expand All @@ -26,7 +22,7 @@

- [**TacoTheDank**](https://github.com/TacoTheDank) for upgrades to gradle, java 1.8 and [improvements](https://github.com/enricocid/Music-Player-GO/pull/248) which I used here!

- [Toastcode](https://toastco.de/) for the wunderbar [Screener - Better screenshots](https://play.google.com/store/apps/details?id=de.toastcode.screener) app
- [Gavin Liu](https://play.google.com/store/apps/developer?id=Gavin+Liu) for the wunderbar [Snapmod](https://play.google.com/store/apps/details?id=cn.gavinliu.snapmod) app

- [Potato Open Sauce Project (POSP)](https://potatoproject.co/) team and [POSP Telegram community](https://t.me/SaucyPotatoesOfficial) for support, inspirations and suggestions! The app itself is based on the original iteration [Potate da home!](https://github.com/enricocid/PotateDaHome) that was built thanks to the team/community feedbacks!

Expand All @@ -42,10 +38,11 @@

- [ZJRDroid](https://github.com/ZJRDroid) for Brazilian Portuguese translations!

- [OraBB1t](https://github.com/OraBB1t) for this [bug reporting](https://github.com/enricocid/VectorifyDaHome/issues/32)
- [OraBB1t](https://github.com/OraBB1t) for this [bug report](https://github.com/enricocid/VectorifyDaHome/issues/32)

- Abdul Kahlawi for reporting and letting me to fix an issue on Lollipop!

- [jahongir28](https://github.com/jahongir28) for the rounded corner [fix](https://github.com/material-components/material-components-android/issues/1278#issuecomment-1248984201)

### SVG sources

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</a>

[![API](https://img.shields.io/static/v1?label=API&message=21&color=a5d6a7)](https://developer.android.com/about/versions/android-5.0.html)
[![TAG](https://img.shields.io/static/v1?label=Tag&message=v1.9.6.4&color=ffe082)](https://github.com/enricocid/VectorifyDaHome/releases)
[![TAG](https://img.shields.io/static/v1?label=Tag&message=v1.9.6.5&color=ffe082)](https://github.com/enricocid/VectorifyDaHome/releases)
<a href="https://github.com/enricocid/VectorifyDaHome/actions">
<img alt="CI" src="https://github.com/enricocid/VectorifyDaHome/workflows/Android%20CI/badge.svg">
</a>
Expand All @@ -17,7 +17,7 @@
<img src="https://hosted.weblate.org/widgets/vectorify-da-home/-/287x66-white.png" />
</a>

<img align="right" src="art3.gif" width="400px"/>
<img align="right" src="art4.gif" width="400px"/>


# Description:
Expand Down
Binary file removed art3.gif
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ class RecentsAdapter(private val recentSetups: MutableList<VectorifyWallpaper>?)
absoluteAdapterPosition.toString()
))
.setPositiveButton(R.string.ok) { _, _ ->
//add an empty list to preferences
try {
val index = recentSetups?.indexOf(wallpaper)!!
if (recentSetups.contains(wallpaper)) recentSetups.remove(wallpaper)
notifyItemRemoved(index)
prefs.recentSetups = recentSetups
} catch (e: Exception) {
e.printStackTrace()
recentSetups?.run {
val index = indexOf(wallpaper)
if (recentSetups.remove(wallpaper)) {
notifyItemRemoved(index)
prefs.recentSetups = recentSetups
}
}
}
.setNegativeButton(R.string.cancel, null)
Expand Down

0 comments on commit 585e62f

Please sign in to comment.