mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/225 - Address small nits, changes default color of ic_delete
This commit is contained in:
parent
c5ccca1f6b
commit
b3096c1536
@ -12,6 +12,7 @@ import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import io.reactivex.Observer
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.ext.getColorFromAttr
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TabInCollectionViewHolder
|
||||
import org.mozilla.fenix.home.sessioncontrol.viewholders.TabViewHolder
|
||||
|
||||
@ -47,6 +48,7 @@ class SwipeToDeleteCallback(
|
||||
) {
|
||||
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
|
||||
val icon = ContextCompat.getDrawable(recyclerView.context, R.drawable.ic_delete)
|
||||
icon?.setTint(R.attr.destructive.getColorFromAttr(recyclerView.context))
|
||||
|
||||
val backgroundDrawable = when {
|
||||
viewHolder is TabInCollectionViewHolder && viewHolder.isLastTab -> {
|
||||
|
@ -133,16 +133,16 @@ class DeleteBrowsingDataFragment : Fragment(), CoroutineScope {
|
||||
}
|
||||
|
||||
private fun deleteSelected() {
|
||||
val openTabs = view!!.open_tabs_item!!.isChecked
|
||||
val browsingData = view!!.browsing_data_item!!.isChecked
|
||||
val collections = view!!.collections_item!!.isChecked
|
||||
val openTabsChecked = view!!.open_tabs_item!!.isChecked
|
||||
val browsingDataChecked = view!!.browsing_data_item!!.isChecked
|
||||
val collectionsChecked = view!!.collections_item!!.isChecked
|
||||
|
||||
startDeletion()
|
||||
launch(Dispatchers.IO) {
|
||||
var jobs = mutableListOf<Deferred<Unit>>()
|
||||
if (openTabs) jobs.add(deleteTabsAsync())
|
||||
if (browsingData) jobs.add(deleteBrowsingDataAsync())
|
||||
if (collections) jobs.add(deleteCollectionsAsync())
|
||||
if (openTabsChecked) jobs.add(deleteTabsAsync())
|
||||
if (browsingDataChecked) jobs.add(deleteBrowsingDataAsync())
|
||||
if (collectionsChecked) jobs.add(deleteCollectionsAsync())
|
||||
|
||||
jobs.awaitAll()
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
@ -5,8 +9,5 @@
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12.531,17.5009C12.2549,17.5009 12.031,17.2771 12.031,17.0009L12,9.0009C12,8.7248 12.2239,8.5009 12.5,8.5009C12.7761,8.5009 13,8.7248 13,9.0009L13.031,17.0009C13.031,17.2771 12.8071,17.5009 12.531,17.5009ZM15,17.5009C14.7239,17.5009 14.5,17.2771 14.5,17.0009L14.5,9.0009C14.5,8.7248 14.7239,8.5009 15,8.5009C15.2761,8.5009 15.5,8.7248 15.5,9.0009L15.5,17.0009C15.5,17.2771 15.2761,17.5009 15,17.5009ZM10,17.5009C9.7239,17.5009 9.5,17.2771 9.5,17.0009L9.5,9.0009C9.5,8.7248 9.7239,8.5009 10,8.5009C10.2761,8.5009 10.5,8.7248 10.5,9.0009L10.5,17.0009C10.5,17.2771 10.2761,17.5009 10,17.5009ZM19,4.0009L15.316,4.0009C14.8986,2.8028 13.7688,2 12.5,2C11.2312,2 10.1014,2.8028 9.684,4.0009L6,4.0009C5.4477,4.0009 5,4.4487 5,5.0009C5,5.5532 5.4477,6.0009 6,6.0009L6,19.0009C6,20.6578 7.3431,22.0009 9,22.0009L16,22.0009C17.6569,22.0009 19,20.6578 19,19.0009L19,6.0009C19.5523,6.0009 20,5.5532 20,5.0009C20,4.4487 19.5523,4.0009 19,4.0009ZM12.5,3.0009C13.2113,3.0031 13.8676,3.3842 14.222,4.0009L10.778,4.0009C11.1324,3.3842 11.7887,3.0031 12.5,3.0009L12.5,3.0009ZM17,19.0009C17,19.5532 16.5523,20.0009 16,20.0009L9,20.0009C8.4477,20.0009 8,19.5532 8,19.0009L8,6.0009L17,6.0009L17,19.0009Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#20123A"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
android:fillColor="?primaryText" />
|
||||
</vector>
|
||||
|
Loading…
Reference in New Issue
Block a user