@@ -46,19 +46,20 @@ public class UploadPresenter {
4646 new Class []{SimilarImageInterface .class }, (proxy , method , methodArgs ) -> null );
4747 private SimilarImageInterface similarImageInterface = SIMILAR_IMAGE ;
4848
49- @ UploadView .UploadPage int currentPage = UploadView .PLEASE_WAIT ;
49+ @ UploadView .UploadPage
50+ private int currentPage = UploadView .PLEASE_WAIT ;
5051
5152
5253 @ Inject
53- public UploadPresenter (UploadModel uploadModel ,
54- UploadController uploadController ,
55- MediaWikiApi mediaWikiApi ) {
54+ UploadPresenter (UploadModel uploadModel ,
55+ UploadController uploadController ,
56+ MediaWikiApi mediaWikiApi ) {
5657 this .uploadModel = uploadModel ;
5758 this .uploadController = uploadController ;
5859 this .mediaWikiApi = mediaWikiApi ;
5960 }
6061
61- public void receive (Uri mediaUri , String mimeType , String source ) {
62+ void receive (Uri mediaUri , String mimeType , String source ) {
6263 receive (Collections .singletonList (mediaUri ), mimeType , source );
6364 }
6465
@@ -70,7 +71,7 @@ public void receive(Uri mediaUri, String mimeType, String source) {
7071 * @param source File source from {@link Contribution.FileSource}
7172 */
7273 @ SuppressLint ("CheckResult" )
73- public void receive (List <Uri > media , String mimeType , @ Contribution .FileSource String source ) {
74+ void receive (List <Uri > media , String mimeType , @ Contribution .FileSource String source ) {
7475 Completable .fromRunnable (() -> uploadModel .receive (media , mimeType , source , similarImageInterface ))
7576 .subscribeOn (Schedulers .io ())
7677 .observeOn (AndroidSchedulers .mainThread ())
@@ -91,7 +92,7 @@ public void receive(List<Uri> media, String mimeType, @Contribution.FileSource S
9192 * @param source File source from {@link Contribution.FileSource}
9293 */
9394 @ SuppressLint ("CheckResult" )
94- public void receiveDirect (Uri media , String mimeType , @ Contribution .FileSource String source , String wikidataEntityIdPref , String title , String desc ) {
95+ void receiveDirect (Uri media , String mimeType , @ Contribution .FileSource String source , String wikidataEntityIdPref , String title , String desc ) {
9596 Completable .fromRunnable (() -> uploadModel .receiveDirect (media , mimeType , source , wikidataEntityIdPref , title , desc , similarImageInterface ))
9697 .subscribeOn (Schedulers .io ())
9798 .observeOn (AndroidSchedulers .mainThread ())
@@ -108,7 +109,7 @@ public void receiveDirect(Uri media, String mimeType, @Contribution.FileSource S
108109 *
109110 * @param licenseName license name
110111 */
111- public void selectLicense (String licenseName ) {
112+ void selectLicense (String licenseName ) {
112113 uploadModel .setSelectedLicense (licenseName );
113114 view .updateLicenseSummary (uploadModel .getSelectedLicense ());
114115 }
@@ -119,7 +120,7 @@ public void selectLicense(String licenseName) {
119120 * Called by the next button in {@link UploadActivity}
120121 */
121122 @ SuppressLint ("CheckResult" )
122- public void handleNext (CategoriesModel categoriesModel , boolean noCategoryWarningShown ) {
123+ void handleNext (CategoriesModel categoriesModel , boolean noCategoryWarningShown ) {
123124 if (currentPage == UploadView .TITLE_CARD ) {
124125 validateCurrentItemTitle ()
125126 .subscribeOn (Schedulers .io ())
@@ -167,7 +168,7 @@ private Title getCurrentImageTitle() {
167168 return getCurrentItem ().title ;
168169 }
169170
170- public String getCurrentImageFileName () {
171+ String getCurrentImageFileName () {
171172 UploadItem currentItem = getCurrentItem ();
172173 return currentItem .title + "." + uploadModel .getCurrentItem ().fileExt ;
173174 }
@@ -193,7 +194,7 @@ private Observable<Integer> validateCurrentItemTitle() {
193194 /**
194195 * Called by the previous button in {@link UploadActivity}
195196 */
196- public void handlePrevious () {
197+ void handlePrevious () {
197198 uploadModel .previous ();
198199 updateContent ();
199200 if (uploadModel .isShowingItem ()) {
@@ -205,7 +206,7 @@ public void handlePrevious() {
205206 /**
206207 * Called when one of the pictures on the top card is clicked on in {@link UploadActivity}
207208 */
208- public void thumbnailClicked (UploadItem item ) {
209+ void thumbnailClicked (UploadItem item ) {
209210 uploadModel .jumpTo (item );
210211 updateContent ();
211212 }
@@ -214,7 +215,7 @@ public void thumbnailClicked(UploadItem item) {
214215 * Called by the submit button in {@link UploadActivity}
215216 */
216217 @ SuppressLint ("CheckResult" )
217- public void handleSubmit (CategoriesModel categoriesModel ) {
218+ void handleSubmit (CategoriesModel categoriesModel ) {
218219 if (view .checkIfLoggedIn ())
219220 uploadModel .buildContributions (categoriesModel .getCategoryStringList ())
220221 .observeOn (Schedulers .io ())
@@ -224,7 +225,7 @@ public void handleSubmit(CategoriesModel categoriesModel) {
224225 /**
225226 * Called by the map button on the right card in {@link UploadActivity}
226227 */
227- public void openCoordinateMap () {
228+ void openCoordinateMap () {
228229 GPSExtractor gpsObj = uploadModel .getCurrentItem ().gpsCoords ;
229230 if (gpsObj != null && gpsObj .imageCoordsExists ) {
230231 view .launchMapActivity (gpsObj .getDecLatitude () + "," + gpsObj .getDecLongitude ());
@@ -241,11 +242,11 @@ private void handleBadPicture(@ImageUtils.Result int result) {
241242 view .showBadPicturePopup (result );
242243 }
243244
244- public void keepPicture () {
245+ void keepPicture () {
245246 uploadModel .keepPicture ();
246247 }
247248
248- public void deletePicture () {
249+ void deletePicture () {
249250 if (uploadModel .getCount () == 1 )
250251 view .finish ();
251252 else {
@@ -265,31 +266,31 @@ public void deletePicture() {
265266 /**
266267 * Toggles the top card's state between open and closed.
267268 */
268- public void toggleTopCardState () {
269+ void toggleTopCardState () {
269270 uploadModel .setTopCardState (!uploadModel .isTopCardState ());
270271 view .setTopCardState (uploadModel .isTopCardState ());
271272 }
272273
273274 /**
274275 * Toggles the bottom card's state between open and closed.
275276 */
276- public void toggleBottomCardState () {
277+ void toggleBottomCardState () {
277278 uploadModel .setBottomCardState (!uploadModel .isBottomCardState ());
278279 view .setBottomCardState (uploadModel .isBottomCardState ());
279280 }
280281
281282 /**
282283 * Toggles the right card's state between open and closed.
283284 */
284- public void toggleRightCardState () {
285+ void toggleRightCardState () {
285286 uploadModel .setRightCardState (!uploadModel .isRightCardState ());
286287 view .setRightCardState (uploadModel .isRightCardState ());
287288 }
288289
289290 /**
290291 * Sets all the cards' states to closed.
291292 */
292- public void closeAllCards () {
293+ void closeAllCards () {
293294 if (uploadModel .isTopCardState ()) {
294295 uploadModel .setTopCardState (false );
295296 view .setTopCardState (false );
@@ -310,15 +311,15 @@ public void init() {
310311 uploadController .prepareService ();
311312 }
312313
313- public void cleanup () {
314+ void cleanup () {
314315 uploadController .cleanup ();
315316 }
316317
317- public void removeView () {
318+ void removeView () {
318319 this .view = DUMMY ;
319320 }
320321
321- public void addView (UploadView view ) {
322+ void addView (UploadView view ) {
322323 this .view = view ;
323324
324325 updateCards ();
@@ -399,11 +400,11 @@ private void showCorrectCards(int currentStep, int uploadCount) {
399400 /**
400401 * @return the item currently being displayed
401402 */
402- public UploadItem getCurrentItem () {
403+ private UploadItem getCurrentItem () {
403404 return uploadModel .getCurrentItem ();
404405 }
405406
406- public List <String > getImageTitleList () {
407+ List <String > getImageTitleList () {
407408 List <String > titleList = new ArrayList <>();
408409 for (UploadItem item : uploadModel .getUploads ()) {
409410 if (item .title .isSet ()) {
0 commit comments