diff --git a/app/src/main/java/com/perol/asdpl/pixivez/activity/SearchRActivityFragment.kt b/app/src/main/java/com/perol/asdpl/pixivez/activity/SearchRActivityFragment.kt
index d4a0838..4599fe4 100644
--- a/app/src/main/java/com/perol/asdpl/pixivez/activity/SearchRActivityFragment.kt
+++ b/app/src/main/java/com/perol/asdpl/pixivez/activity/SearchRActivityFragment.kt
@@ -58,12 +58,12 @@ class SearchRActivityFragment : Fragment() {
recyclerview.adapter = tagsTextAdapter
tagsTextAdapter.setOnItemClickListener { adapter, view, position ->
val s_tag = tags[position]
- if (s_tag.translated_name.isNotEmpty())
+ if (s_tag.translated_name != null && s_tag.translated_name.isNotEmpty())
tagsTextViewModel.addhistory(s_tag.name + "|" + s_tag.translated_name)
else tagsTextViewModel.addhistory(s_tag.name)
val bundle = Bundle()
bundle.putString("searchword", tags[position].name)
- val intent = Intent(activity!!, SearchResultActivity::class.java)
+ val intent = Intent(requireActivity(), SearchResultActivity::class.java)
intent.putExtras(bundle)
startActivityForResult(intent, 775)
}
diff --git a/app/src/main/java/com/perol/asdpl/pixivez/activity/SettingActivity.kt b/app/src/main/java/com/perol/asdpl/pixivez/activity/SettingActivity.kt
index 044e9bd..490d088 100644
--- a/app/src/main/java/com/perol/asdpl/pixivez/activity/SettingActivity.kt
+++ b/app/src/main/java/com/perol/asdpl/pixivez/activity/SettingActivity.kt
@@ -29,7 +29,6 @@ import android.view.MenuItem
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import androidx.viewpager2.widget.ViewPager2
-import com.google.android.material.snackbar.Snackbar
import com.google.android.material.tabs.TabLayout
import com.perol.asdpl.pixivez.R
import com.perol.asdpl.pixivez.fragments.AboutXFragment
@@ -56,10 +55,6 @@ class SettingActivity : RinkActivity() {
setContentView(R.layout.activity_setting)
setSupportActionBar(toolbar)
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
- fab.setOnClickListener { view ->
- Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
- .setAction("Action", null).show()
- }
tablayout_setting.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabReselected(tab: TabLayout.Tab?) {
diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml
index 8ed17e9..5ed5649 100644
--- a/app/src/main/res/layout/activity_setting.xml
+++ b/app/src/main/res/layout/activity_setting.xml
@@ -48,12 +48,5 @@
-