Skip to content

Commit

Permalink
Merge pull request #109 from alexrintt/master
Browse files Browse the repository at this point in the history
Remove multiple-like statements and fix severe issue on `DocumentFile` API
  • Loading branch information
Alex Rintt authored Nov 7, 2022
2 parents 394cf26 + ef6061b commit 25f58f9
Show file tree
Hide file tree
Showing 45 changed files with 196 additions and 249 deletions.
89 changes: 0 additions & 89 deletions .all-contributorsrc

This file was deleted.

17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.6.0

This release contains a severe API fixes and some minor doc changes:

### Breaking changes

- Unused arguments in `DocumentFile.getContent` and `DocumentFile.getContentAsString`. [#107](https://github.com/alexrintt/shared-storage/issues/107).
- Package import it's now done through a single import.

## 0.5.0

This release contains:
Expand All @@ -7,7 +16,7 @@ This release contains:
- Example project improvements.
- Bug fixes.

To see details, refer to rollup PR [#100](https://github.com/lakscastro/shared-storage/pull/100).
To see details, refer to rollup PR [#100](https://github.com/alexrintt/shared-storage/pull/100).

### New

Expand All @@ -23,7 +32,7 @@ To see details, refer to rollup PR [#100](https://github.com/lakscastro/shared-s
### Bug fixes

- `DocumentFile.canRead` it's now calling the right API (`canRead`) instead of the similar one (`canWrite`).
- [Fix](https://github.com/lakscastro/shared-storage/pull/100/files#diff-6f516633fcc1095b16ad5e0cc2a2c9711ee903cb115835d703f3c0ccfd6e0d31R38-R62) infinite loading of `getDocumentThumbnail` API when thumbnail is not available.
- [Fix](https://github.com/alexrintt/shared-storage/pull/100/files#diff-6f516633fcc1095b16ad5e0cc2a2c9711ee903cb115835d703f3c0ccfd6e0d31R38-R62) infinite loading of `getDocumentThumbnail` API when thumbnail is not available.

### Example project

Expand All @@ -38,13 +47,13 @@ To see details, refer to rollup PR [#100](https://github.com/lakscastro/shared-s

Minimal hotfix:

- Closes the `OutputStream` when creating a file [#61](https://github.com/lakscastro/shared-storage/issues/61), [#86](https://github.com/lakscastro/shared-storage/pull/86) (@jfaltis).
- Closes the `OutputStream` when creating a file [#61](https://github.com/alexrintt/shared-storage/issues/61), [#86](https://github.com/alexrintt/shared-storage/pull/86) (@jfaltis).

## 0.4.1

Minimal hotfix of the example project:

- Fix build error of the example project. Reported at [#70](https://github.com/lakscastro/shared-storage/issues/70) and fixed by [#72](https://github.com/lakscastro/shared-storage/pull/72) (@jfaltis).
- Fix build error of the example project. Reported at [#70](https://github.com/alexrintt/shared-storage/issues/70) and fixed by [#72](https://github.com/alexrintt/shared-storage/pull/72) (@jfaltis).

## 0.4.0

Expand Down
24 changes: 12 additions & 12 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand All @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
lakscastro@gmail.com.
alexrintt@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Laks Castro
Copyright (c) 2021 Alex Rintt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 11 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,27 @@

## Documentation

See the website for [documentation](https://lakscastro.github.io/shared-storage).
See the website for [documentation](https://alexrintt.github.io/shared-storage).

All documentation is also available under `/docs` to each released version which is the data source of the website.

You can contribute to the documentation by just editing these files through the GitHub web editor!

To check all ways you can contribute to this package see [Contributing/Ways to contribute](https://lakscastro.github.io/shared-storage/Contributing/Ways%20to%20contribute/).
To check all ways you can contribute to this package see [Contributing/Ways to contribute](https://alexrintt.github.io/shared-storage/Contributing/Ways%20to%20contribute/).

Latest changes are available on `master` branch and the actual latest published package version lives under `release` branch.

All other branches are derivated from issues, new features or bug fixes.

## Contributors

These are the brilliant minds behind the development of this plugin!

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://lakscastro.github.io"><img src="https://avatars.githubusercontent.com/u/51419598?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lask</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/commits?author=lakscastro" title="Code">💻</a> <a href="#maintenance-lakscastro" title="Maintenance">🚧</a> <a href="https://github.com/lakscastro/shared-storage/commits?author=lakscastro" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/ankitparmar007"><img src="https://avatars.githubusercontent.com/u/73648141?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ankitparmar007</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/issues?q=author%3Aankitparmar007" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://www.bibliotecaortodoxa.ro"><img src="https://avatars.githubusercontent.com/u/1148228?v=4?s=100" width="100px;" alt=""/><br /><sub><b>www.bibliotecaortodoxa.ro</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/commits?author=aplicatii-romanesti" title="Code">💻</a> <a href="https://github.com/lakscastro/shared-storage/issues?q=author%3Aaplicatii-romanesti" title="Bug reports">🐛</a> <a href="#ideas-aplicatii-romanesti" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/dangilbert"><img src="https://avatars.githubusercontent.com/u/6799566?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dangilbert</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/commits?author=dangilbert" title="Code">💻</a> <a href="https://github.com/lakscastro/shared-storage/issues?q=author%3Adangilbert" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/dhaval-k-simformsolutions"><img src="https://avatars.githubusercontent.com/u/90894202?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dhaval-k-simformsolutions</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/issues?q=author%3Adhaval-k-simformsolutions" title="Bug reports">🐛</a> <a href="#ideas-dhaval-k-simformsolutions" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://eternityforest.com"><img src="https://avatars.githubusercontent.com/u/758047?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Dunn</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/issues?q=author%3AEternityForest" title="Bug reports">🐛</a> <a href="https://github.com/lakscastro/shared-storage/commits?author=EternityForest" title="Code">💻</a> <a href="https://github.com/lakscastro/shared-storage/commits?author=EternityForest" title="Documentation">📖</a></td>
<td align="center"><a href="https://jfaltis.de"><img src="https://avatars.githubusercontent.com/u/45465572?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jfaltis</b></sub></a><br /><a href="https://github.com/lakscastro/shared-storage/issues?q=author%3Ajfaltis" title="Bug reports">🐛</a> <a href="https://github.com/lakscastro/shared-storage/commits?author=jfaltis" title="Code">💻</a> <a href="https://github.com/lakscastro/shared-storage/commits?author=jfaltis" title="Documentation">📖</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
- [clragon](https://github.com/clragon) submitted a severe bug report and opened discussions around package architecture, thanks!
- [jfaltis](https://github.com/jfaltis) fixed a memory leak and implemented an API to override existing files, thanks for you contribution!
- [EternityForest](https://github.com/EternityForest) did fix a severe crash when the ID column was not provided and implemented a new feature to list all subfolders, thanks man!
- Thanks [dhaval-k-simformsolutions](https://github.com/dhaval-k-simformsolutions) for taking time to submit bug reports related to duplicated file entries!
- [dangilbert](https://github.com/dangilbert) pointed and fixed bug when the user doesn't select a folder, thanks man!
- A huge thanks to [aplicatii-romanesti](https://www.bibliotecaortodoxa.ro/) for taking time to submit device specific issues and for supporting the project!
- I would thanks [ankitparmar007](https://github.com/ankitparmar007) for discussing and requesting create file related APIs!

<br>

Expand All @@ -66,9 +52,9 @@ These are the brilliant minds behind the development of this plugin!
Open Source
</h2>
<p align="center">
<sub>Copyright © 2021-present, Laks Castro.</sub>
<sub>Copyright © 2021-present, Alex Rintt.</sub>
</p>
<p align="center">Shared Storage <a href="https://github.com/LaksCastro/shared-storage/blob/master/LICENSE.md">is MIT licensed 💖</a></p>
<p align="center">Shared Storage <a href="https://github.com/alexrintt/shared-storage/blob/master/LICENSE.md">is MIT licensed 💖</a></p>
<p align="center">
<img src="https://user-images.githubusercontent.com/51419598/161439601-fc228a0d-d09d-4dbb-b5a3-ebc5dbcf9f46.png" width="35" />
</p>
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'io.lakscastro.sharedstorage'
group 'io.alexrintt.sharedstorage'
version '1.0-SNAPSHOT'

buildscript {
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="io.lakscastro.sharedstorage">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="io.alexrintt.sharedstorage">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package io.lakscastro.sharedstorage
package io.alexrintt.sharedstorage

import android.content.Context
import androidx.annotation.NonNull
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding
import io.flutter.embedding.engine.plugins.activity.ActivityAware
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding
import io.lakscastro.sharedstorage.environment.EnvironmentApi
import io.lakscastro.sharedstorage.mediastore.MediaStoreApi
import io.lakscastro.sharedstorage.storageaccessframework.StorageAccessFrameworkApi
import io.alexrintt.sharedstorage.environment.EnvironmentApi
import io.alexrintt.sharedstorage.mediastore.MediaStoreApi
import io.alexrintt.sharedstorage.storageaccessframework.StorageAccessFrameworkApi

const val ROOT_CHANNEL = "io.lakscastro.plugins/sharedstorage"
const val ROOT_CHANNEL = "io.alexrintt.plugins/sharedstorage"

/** Flutter plugin Kotlin implementation `SharedStoragePlugin` */
class SharedStoragePlugin : FlutterPlugin, ActivityAware {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package io.lakscastro.sharedstorage.environment
package io.alexrintt.sharedstorage.environment

import android.os.Build
import android.os.Environment
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.lakscastro.sharedstorage.ROOT_CHANNEL
import io.lakscastro.sharedstorage.SharedStoragePlugin
import io.lakscastro.sharedstorage.plugin.API_30
import io.lakscastro.sharedstorage.plugin.Listenable
import io.lakscastro.sharedstorage.plugin.notSupported
import io.alexrintt.sharedstorage.ROOT_CHANNEL
import io.alexrintt.sharedstorage.SharedStoragePlugin
import io.alexrintt.sharedstorage.plugin.API_30
import io.alexrintt.sharedstorage.plugin.Listenable
import io.alexrintt.sharedstorage.plugin.notSupported
import java.io.File

class EnvironmentApi(val plugin: SharedStoragePlugin) :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package io.lakscastro.sharedstorage.mediastore
package io.alexrintt.sharedstorage.mediastore

import android.os.Build
import android.provider.MediaStore
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.lakscastro.sharedstorage.ROOT_CHANNEL
import io.lakscastro.sharedstorage.SharedStoragePlugin
import io.lakscastro.sharedstorage.plugin.API_29
import io.lakscastro.sharedstorage.plugin.Listenable
import io.alexrintt.sharedstorage.ROOT_CHANNEL
import io.alexrintt.sharedstorage.SharedStoragePlugin
import io.alexrintt.sharedstorage.plugin.API_29
import io.alexrintt.sharedstorage.plugin.Listenable

class MediaStoreApi(val plugin: SharedStoragePlugin) : MethodChannel.MethodCallHandler, Listenable {
private var channel: MethodChannel? = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.lakscastro.sharedstorage.plugin
package io.alexrintt.sharedstorage.plugin

/**
* Interface shared across API classes to make intuitive and clean [init] and [dispose] plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.lakscastro.sharedstorage.plugin
package io.alexrintt.sharedstorage.plugin

import android.os.Build
import io.flutter.plugin.common.MethodChannel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.lakscastro.sharedstorage.plugin
package io.alexrintt.sharedstorage.plugin

import io.flutter.plugin.common.BinaryMessenger

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.lakscastro.sharedstorage.plugin
package io.alexrintt.sharedstorage.plugin

import android.os.Build

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.lakscastro.sharedstorage.storageaccessframework
package io.alexrintt.sharedstorage.storageaccessframework

import android.content.Intent
import android.net.Uri
Expand All @@ -10,10 +10,10 @@ import androidx.documentfile.provider.DocumentFile
import com.anggrayudi.storage.file.child
import io.flutter.plugin.common.*
import io.flutter.plugin.common.EventChannel.StreamHandler
import io.lakscastro.sharedstorage.ROOT_CHANNEL
import io.lakscastro.sharedstorage.SharedStoragePlugin
import io.lakscastro.sharedstorage.plugin.*
import io.lakscastro.sharedstorage.storageaccessframework.lib.*
import io.alexrintt.sharedstorage.ROOT_CHANNEL
import io.alexrintt.sharedstorage.SharedStoragePlugin
import io.alexrintt.sharedstorage.plugin.*
import io.alexrintt.sharedstorage.storageaccessframework.lib.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand Down
Loading

0 comments on commit 25f58f9

Please sign in to comment.