Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
/ AmazWare Public archive

Commit

Permalink
Delete unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
Keddnyo committed Mar 13, 2022
1 parent ef76861 commit 5450c04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
19 changes: 0 additions & 19 deletions app/src/main/java/io/github/keddnyo/amazware/activities/Feed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ class Feed : AppCompatActivity() {
}
}

override fun onResume() {
super.onResume()

val sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(this)
val floatingButton: FloatingActionButton = findViewById(R.id.favouriteButtonFeed)

val deviceSource = sharedPreferences.getString("deviceSource", "")
if (deviceSource != "") {
floatingButton.visibility = View.VISIBLE
} else {
floatingButton.visibility = View.GONE
}

floatingButton.setOnClickListener {
openExtras(deviceSource!!.toInt()) // Open Extras favourite device
}
}

private fun init() {
val okHttpClient = OkHttpClient()
val deviceIndex: ListView = findViewById(R.id.feedView)
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/res/layout/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,4 @@

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/favouriteButtonFeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:src="@drawable/ic_target"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 5450c04

Please sign in to comment.