Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
a32ead24
Commit
a32ead24
authored
Jul 02, 2020
by
Evan W. Patton
Committed by
Jeffrey Schiller
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deleting gallery project from trash
Change-Id: Id4268b96f4603e5b74f34028fa40300ace9b3145
parent
9e6b6622
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
appinventor/appengine/src/com/google/appinventor/client/explorer/project/Project.java
...m/google/appinventor/client/explorer/project/Project.java
+19
-20
No files found.
appinventor/appengine/src/com/google/appinventor/client/explorer/project/Project.java
View file @
a32ead24
...
...
@@ -14,6 +14,7 @@ import com.google.appinventor.client.settings.project.ProjectSettings;
import
com.google.appinventor.client.tracking.Tracking
;
import
com.google.appinventor.shared.rpc.project.ProjectNode
;
import
com.google.appinventor.shared.rpc.project.ProjectRootNode
;
import
com.google.appinventor.shared.rpc.project.ProjectServiceAsync
;
import
com.google.appinventor.shared.rpc.project.UserProject
;
import
java.util.ArrayList
;
...
...
@@ -262,29 +263,27 @@ public final class Project {
public
void
deleteFromTrash
()
{
Tracking
.
trackEvent
(
Tracking
.
PROJECT_EVENT
,
Tracking
.
PROJECT_ACTION_DELETE_PROJECT_YA
,
getProjectName
());
Tracking
.
PROJECT_ACTION_DELETE_PROJECT_YA
,
getProjectName
());
final
ProjectServiceAsync
projectService
=
Ode
.
getInstance
().
getProjectService
();
final
OdeAsyncCallback
<
Void
>
deleteCallback
=
new
OdeAsyncCallback
<
Void
>()
{
@Override
public
void
onSuccess
(
Void
result
)
{
Ode
.
getInstance
().
getProjectManager
().
removeDeletedProject
(
getProjectId
());
}
};
if
(
isPublished
())
{
Ode
.
getInstance
().
getGalleryService
().
deleteApp
(
projectInfo
.
getGalleryId
(),
new
OdeAsyncCallback
<
Void
>(
// failure message
MESSAGES
.
galleryDeleteError
())
{
@Override
public
void
onSuccess
(
Void
result
)
{
// need to update gallery list
GalleryClient
gallery
=
GalleryClient
.
getInstance
();
gallery
.
appWasChanged
();
}
});
new
OdeAsyncCallback
<
Void
>(
MESSAGES
.
galleryDeleteError
())
{
@Override
public
void
onSuccess
(
Void
result
)
{
// need to update gallery list
GalleryClient
.
getInstance
().
appWasChanged
();
// Delete the app
projectService
.
deleteProject
(
getProjectId
(),
deleteCallback
);
}
});
}
else
{
Ode
.
getInstance
().
getProjectService
().
deleteProject
(
getProjectId
(),
new
OdeAsyncCallback
<
Void
>(
// failure message
MESSAGES
.
deleteProjectError
())
{
@Override
public
void
onSuccess
(
Void
result
)
{
Ode
.
getInstance
().
getProjectManager
().
removeDeletedProject
(
getProjectId
());
}
});
Ode
.
getInstance
().
getProjectService
().
deleteProject
(
getProjectId
(),
deleteCallback
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment