Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for download and share. #660

Merged
merged 1 commit into from
Jun 25, 2017

Conversation

Sam1301
Copy link
Member

@Sam1301 Sam1301 commented Jun 4, 2017

Library used for download https://github.com/wkh237/react-native-fetch-blob.
It supports use of native download manager for android and file stream for large files in addition to features supported by https://github.com/itinance/react-native-fs.

@saketkumar
Copy link
Contributor

@Sam1301 Hey just one question, does this library supports both android and iOS files upload? As it will help for my work on uploading files.

@Sam1301
Copy link
Member Author

Sam1301 commented Jun 5, 2017

@saketkumar95 yep, checkout https://github.com/wkh237/react-native-fetch-blob/wiki

Copy link
Contributor

@saketkumar saketkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Sam1301 👍 :)

export default (url: string) => {
const shareOptions = {
message: url,
title: 'Shared using Zulip',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be added to src/i18n/translations/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep :), will add strings to transifex once pr is approved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need some better workflow for that since master will technically be broken before translating this. (or not in that case?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Here I need the translation as a string so probably I'd use injection api. Maybe we could do the translation outside this function? Did a quick test with this component.

import { Auth } from '../types';

export default (url: string, auth: Auth) => {
if (Platform.OS === 'android') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe not, since that setup is for controlling the stylistic differences on both platforms; example statusBar margin, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use any other file as platform specific though.
So downloadFile.ios.js and downloadFile.android.js

@Sam1301
Copy link
Member Author

Sam1301 commented Jun 6, 2017

oh, forgot to post the update message :)
Updated the branch, also posted a question here.

@zulipbot
Copy link
Member

Heads up @Sam1301, we just merged some commits (latest: c1ca982) that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

@Sam1301
Copy link
Member Author

Sam1301 commented Jun 16, 2017

Updated the branch.

@borisyankov
Copy link
Contributor

Good to go.

@borisyankov borisyankov merged commit f1b916c into zulip:master Jun 25, 2017
@Sam1301 Sam1301 deleted the download-share branch July 17, 2017 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants