File tree 2 files changed +10
-4
lines changed
app/src/main/java/fr/free/nrw/commons
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ private void startSpeechInput(String locale) {
146
146
RecognizerIntent .EXTRA_LANGUAGE ,
147
147
locale
148
148
);
149
+
149
150
try {
150
151
if (activity == null ) {
151
152
fragment .startActivityForResult (intent , REQUEST_CODE_FOR_VOICE_INPUT );
@@ -182,9 +183,14 @@ public void handleSpeechResult(String spokenText) {
182
183
*/
183
184
public void removeDescription (final UploadMediaDetail uploadMediaDetail , final int position ) {
184
185
selectedLanguages .remove (position );
185
- final int ListPosition =
186
- (int ) selectedLanguages .keySet ().stream ().filter (e -> e < position ).count ();
187
- this .uploadMediaDetails .remove (uploadMediaDetails .get (ListPosition ));
186
+ int listPosition = 0 ;
187
+ List <Integer > keysList = new ArrayList <>(selectedLanguages .keySet ());
188
+ for (Integer key : keysList ) {
189
+ if (key < position ) {
190
+ listPosition ++;
191
+ }
192
+ }
193
+ this .uploadMediaDetails .remove (uploadMediaDetails .get (listPosition ));
188
194
int i = position + 1 ;
189
195
while (selectedLanguages .containsKey (i )) {
190
196
selectedLanguages .remove (i );
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public static SimpleDateFormat getMediaSimpleDateFormat() {
36
36
* @return timestamp
37
37
*/
38
38
public static SimpleDateFormat getIso8601DateFormatTimestamp () {
39
- final SimpleDateFormat simpleDateFormat = new SimpleDateFormat ("yyyy-MM-dd'T'HH:mm:ssX " ,
39
+ final SimpleDateFormat simpleDateFormat = new SimpleDateFormat ("yyyy-MM-dd'T'HH:mm:ss'Z' " ,
40
40
Locale .ROOT );
41
41
simpleDateFormat .setTimeZone (TimeZone .getTimeZone ("UTC" ));
42
42
return simpleDateFormat ;
You can’t perform that action at this time.
0 commit comments