Skip to content

Commit

Permalink
Added condition for docxf extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Jan 30, 2024
1 parent 72125b0 commit 629d314
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package com.owncloud.android.presentation.files.filelist

import android.annotation.SuppressLint
import android.content.Intent
import android.content.res.ColorStateList
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
Expand Down Expand Up @@ -854,6 +855,9 @@ class MainFileListFragment : Fragment(),
removeDefaultTint()
title = appRegistry.name
itemIcon = ResourcesCompat.getDrawable(resources, MimetypeIconUtil.getFileTypeIconId(appRegistry.mimeType, appRegistry.ext), null)
if (appRegistry.ext == FILE_DOCXF_EXTENSION) {
itemIcon?.setTintList(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.file_docxf)))
}
setOnClickListener {
showFilenameTextDialog(appRegistry.ext)
currentDefaultApplication = appRegistry.defaultApplication
Expand Down Expand Up @@ -1359,6 +1363,7 @@ class MainFileListFragment : Fragment(),
private const val DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER"

private const val TAG_SECOND_FRAGMENT = "SECOND_FRAGMENT"
private const val FILE_DOCXF_EXTENSION = "docxf"

@JvmStatic
fun newInstance(
Expand Down
2 changes: 1 addition & 1 deletion owncloudApp/src/main/res/drawable/file_docxf.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector android:autoMirrored="true"
android:height="128dp"
android:tint="#66a6a3"
android:tint="@color/file_docxf"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="128dp"
Expand Down
2 changes: 2 additions & 0 deletions owncloudApp/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
<color name="warning">#f4511e</color>
<color name="success">#009688</color>

<color name="file_docxf">#66a6a3</color>

<!-- Bottom Sheet Fragment -->
<color name="bottom_sheet_fragment_item_color">#6E758C</color>
<color name="bottom_sheet_fragment_title_color">#6E758C</color>
Expand Down

0 comments on commit 629d314

Please sign in to comment.