mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
Merge pull request #3845 from nextcloud/thumbnailWithCorrectIcon
Thumbnail with correct mimetype
This commit is contained in:
commit
3456fec447
3 changed files with 6 additions and 7 deletions
|
@ -28,7 +28,7 @@ if [ $3 = $stableBranch ]; then
|
|||
echo "New findbugs result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html"
|
||||
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.html --upload-file build/reports/spotbugs/spotbugs.html
|
||||
|
||||
summary=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/spotbugs/spotbugs.html | head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"/Summary/FindBugs ($stableBranch)/" | tr "\"" "\'" | tr -d "\r\n")
|
||||
summary=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/spotbugs/spotbugs.html | head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"/Summary/SpotBugs ($stableBranch)/" | tr "\"" "\'" | tr -d "\r\n")
|
||||
curl -u $4:$5 -X PUT -d "$summary" https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/findbugs-summary-$stableBranch.html
|
||||
|
||||
if [ $lintValue -ne 1 ]; then
|
||||
|
|
|
@ -1 +1 @@
|
|||
475
|
||||
477
|
||||
|
|
|
@ -65,6 +65,7 @@ import com.owncloud.android.ui.TextDrawable;
|
|||
import com.owncloud.android.ui.activity.ComponentsGetter;
|
||||
import com.owncloud.android.ui.fragment.ExtendedListFragment;
|
||||
import com.owncloud.android.ui.interfaces.OCFileListFragmentInterface;
|
||||
import com.owncloud.android.utils.BitmapUtils;
|
||||
import com.owncloud.android.utils.DisplayUtils;
|
||||
import com.owncloud.android.utils.FileSortOrder;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
@ -487,11 +488,9 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
mAccount, asyncTasks);
|
||||
|
||||
if (thumbnail == null) {
|
||||
if (MimeTypeUtil.isVideo(file)) {
|
||||
thumbnail = ThumbnailsCacheManager.mDefaultVideo;
|
||||
} else {
|
||||
thumbnail = ThumbnailsCacheManager.mDefaultImg;
|
||||
}
|
||||
thumbnail = BitmapUtils.drawableToBitmap(
|
||||
MimeTypeUtil.getFileTypeIcon(file.getMimeType(), file.getFileName(),
|
||||
mAccount, mContext));
|
||||
}
|
||||
final ThumbnailsCacheManager.AsyncThumbnailDrawable asyncDrawable =
|
||||
new ThumbnailsCacheManager.AsyncThumbnailDrawable(mContext.getResources(),
|
||||
|
|
Loading…
Reference in a new issue