forked from fm-sys/snapdrop-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
82 additions
and
77 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/fmsys/snapdrop/utils/StateHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.fmsys.snapdrop.utils; | ||
|
||
public class StateHandler { | ||
private boolean currentlyOffline = false; | ||
private boolean currentlyLoading = true; | ||
private boolean currentlyStarting = true; | ||
|
||
public boolean isCurrentlyOffline() { | ||
return currentlyOffline; | ||
} | ||
|
||
public void setCurrentlyOffline(final boolean currentlyOffline) { | ||
this.currentlyOffline = currentlyOffline; | ||
} | ||
|
||
public boolean isCurrentlyLoading() { | ||
return currentlyLoading; | ||
} | ||
|
||
public void setCurrentlyLoading(final boolean currentlyLoading) { | ||
this.currentlyLoading = currentlyLoading; | ||
|
||
if (!currentlyLoading) { | ||
currentlyStarting = false; | ||
} | ||
} | ||
|
||
public boolean isCurrentlyStarting() { | ||
return currentlyStarting; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters