|
|
@ -14,14 +14,32 @@ public class BookmarkUiModel { |
|
|
|
|
|
|
|
|
|
|
|
@Nullable private String mCurrentFolder; |
|
|
|
@Nullable private String mCurrentFolder; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Sets the current folder that is being shown. |
|
|
|
|
|
|
|
* Use null as the root folder. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param folder the current folder, null for root. |
|
|
|
|
|
|
|
*/ |
|
|
|
public void setCurrentFolder(@Nullable String folder) { |
|
|
|
public void setCurrentFolder(@Nullable String folder) { |
|
|
|
mCurrentFolder = folder; |
|
|
|
mCurrentFolder = folder; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Determines if the current folder is |
|
|
|
|
|
|
|
* the root folder. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return true if the current folder is |
|
|
|
|
|
|
|
* the root, false otherwise. |
|
|
|
|
|
|
|
*/ |
|
|
|
public boolean isRootFolder() { |
|
|
|
public boolean isRootFolder() { |
|
|
|
return mCurrentFolder == null; |
|
|
|
return mCurrentFolder == null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Gets the current folder that is being shown. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return the current folder, null for root. |
|
|
|
|
|
|
|
*/ |
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
public String getCurrentFolder() { |
|
|
|
public String getCurrentFolder() { |
|
|
|
return mCurrentFolder; |
|
|
|
return mCurrentFolder; |
|
|
|