Skip to content

Fix for issue #1037 #1086

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.SpannableString;
import android.text.TextPaint;
import android.text.TextWatcher;
import android.text.style.UnderlineSpan;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
Expand All @@ -36,21 +40,23 @@
import butterknife.OnClick;
import butterknife.OnItemSelected;
import butterknife.OnTouch;
import dagger.android.support.DaggerFragment;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
import fr.free.nrw.commons.settings.Prefs;
import fr.free.nrw.commons.ui.widget.HtmlTextView;
import timber.log.Timber;

import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_UP;

public class SingleUploadFragment extends CommonsDaggerSupportFragment {
public class SingleUploadFragment extends DaggerFragment {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you changed this?

Copy link
Author

Choose a reason for hiding this comment

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

I haven't changed it, it's automatically changed.

Copy link
Member

Choose a reason for hiding this comment

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

Please undo it. Usage of DaggerFragment would cause crashes.

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove it @maskaravivek

Copy link
Author

@mithlesh4257 mithlesh4257 Jan 24, 2018

Choose a reason for hiding this comment

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

@maskaravivek, I had deleted the previous Commons forked repository due to some bugs and forked again. Can I make another PR as through this I'm unable to change my files? Please help @maskaravivek !

Copy link
Author

Choose a reason for hiding this comment

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

Should I make another PR that is in that I just have changed "upload/SingleUploadFragment.java" file as I had deleted the previously forked repo, I'm not also able to change this file directly from this PR.
@maskaravivek, @neslihanturan Please help!

Copy link
Author

Choose a reason for hiding this comment

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

Or I have one solution for it, May you edit this @maskaravivek , @neslihanturan?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mithlesh4257 you can fork it again, and make a fresh PR don't worry. I am closing this. Please follow this document before https://github.com/commons-app/apps-android-commons/wiki/Setting-up-dev-enviroment by changing "maskaravivek" username with yours. And please make sure all of the steps we discussed here are covered before preparing PR. Make sure you checked your commits and added meaningful commit messages before pushing.

Besides, if you want to leave this task for someone else to handle, please notify us.

@BindView(R.id.titleEdit) EditText titleEdit;
@BindView(R.id.descEdit) EditText descEdit;
@BindView(R.id.titleDescButton) Button titleDescButton;
@BindView(R.id.share_license_summary) TextView licenseSummaryView;
@BindView(R.id.share_license_summary) HtmlTextView licenseSummaryView;

@BindView(R.id.licenseSpinner) Spinner licenseSpinner;

@Inject @Named("default_preferences") SharedPreferences prefs;
Expand Down Expand Up @@ -240,9 +246,15 @@ boolean descriptionInfo(View view, MotionEvent motionEvent) {
}
return false;
}
/*




*/

Copy link
Collaborator

Choose a reason for hiding this comment

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

For what this empty lines stands for?

Copy link
Author

Choose a reason for hiding this comment

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

I'm removing it.

private void setLicenseSummary(String license) {
licenseSummaryView.setText(getString(R.string.share_license_summary, getString(Utils.licenseNameFor(license))));
licenseSummaryView.setHtmlText(getString(R.string.share_license_summary, getString(Utils.licenseNameFor(license))));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_single_upload.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
android:id="@+id/titleDescButton"
/>

<TextView
<fr.free.nrw.commons.ui.widget.HtmlTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share_license_summary"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<string name="no_uploads_yet">You have not yet uploaded any photos.</string>
<string name="menu_retry_upload">Retry</string>
<string name="menu_cancel_upload">Cancel</string>
<string name="share_license_summary">This image will be licensed under %1$s</string>
<string name="share_license_summary">This image will be licensed under &lt;a href=\"\"&gt; %1$s&lt;/&gt;</string>
<string name="media_upload_policy">By submitting this picture, I declare that this is my own work, that it does not contain copyrighted material or selfies, and otherwise adheres to &lt;a href=\"https://commons.wikimedia.org/wiki/Commons:Policies_and_guidelines\"&gt;Wikimedia Commons policies&lt;/a&gt;.</string>
<string name="menu_download">Download</string>
<string name="preference_license">License</string>
Expand Down