Skip to content

ParseFile should NOT extends ParseObject. #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/objects/parse_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class ParseBase {
}

bool _isDirty(bool considerChildren) {
if (_dirty || _unsavedChanges.isNotEmpty) {
if (_dirty || _unsavedChanges.isNotEmpty || objectId == null) {
return true;
}

Expand Down
8 changes: 5 additions & 3 deletions lib/src/objects/parse_file.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
part of flutter_parse_sdk;

class ParseFile extends ParseObject {
class ParseFile extends ParseBase {
/// Creates a new file
///
/// {https://docs.parseplatform.org/rest/guide/#files/}
Expand All @@ -9,8 +9,7 @@ class ParseFile extends ParseObject {
String url,
bool debug,
ParseHTTPClient client,
bool autoSendSessionId})
: super(keyFile) {
bool autoSendSessionId}) {
_debug = isDebugEnabled(objectLevelDebug: debug);
_client = client ??
ParseHTTPClient(
Expand All @@ -27,6 +26,9 @@ class ParseFile extends ParseObject {
}
}

bool _debug;
ParseHTTPClient _client;

File file;

String get name => super.get<String>(keyVarName);
Expand Down