File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed
app/src/main/java/it/niedermann/owncloud/notes/share Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -345,17 +345,19 @@ public void refreshSharesFromDB() {
345345 adapter .addShares (shares );
346346
347347 // TODO: Will be added later on...
348- List <OCShare > publicShares = new ArrayList <>();
349-
350- if (containsNoNewPublicShare (adapter .getShares ())) {
351- final OCShare ocShare = new OCShare ();
352- ocShare .setShareType (ShareType .NEW_PUBLIC_LINK );
353- publicShares .add (ocShare );
354- } else {
355- adapter .removeNewPublicShare ();
356- }
348+ /*
349+ List<OCShare> publicShares = new ArrayList<>();
350+
351+ if (containsNoNewPublicShare(adapter.getShares())) {
352+ final OCShare ocShare = new OCShare();
353+ ocShare.setShareType(ShareType.NEW_PUBLIC_LINK);
354+ publicShares.add(ocShare);
355+ } else {
356+ adapter.removeNewPublicShare();
357+ }
357358
358- adapter .addShares (publicShares );
359+ adapter.addShares(publicShares);
360+ */
359361 });
360362 } catch (Exception e ) {
361363 Log_OC .d (TAG , "Exception while refreshSharesFromDB: " + e );
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import com.owncloud.android.lib.resources.shares.ShareType
66fun List<CreateShareResponse>.toOCShare (): List <OCShare > {
77 return map { response ->
88 OCShare ().apply {
9- id = response.id.toLongOrNull() ? : 0
9+ id = response.id.toLongOrNull() ? : - 1L
1010 fileSource = response.fileSource
1111 itemSource = response.itemSource
1212 shareType = when (response.shareType) {
@@ -32,5 +32,5 @@ fun List<CreateShareResponse>.toOCShare(): List<OCShare> {
3232 mimetype = response.mimetype
3333 ownerDisplayName = response.displaynameOwner
3434 }
35- }
35+ }.filter { it.id != - 1L }
3636}
You can’t perform that action at this time.
0 commit comments