Skip to content
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

feat: ability to edit badges #429

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

adityastic
Copy link
Collaborator

@adityastic adityastic commented Jul 5, 2019

Fixes #420

Changes:

  • Ability to Edit Badges

Screenshots for the change:
420

@adityastic adityastic requested a review from yashk2000 July 5, 2019 04:06
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
import kotlinx.android.synthetic.main.activity_edit_badge.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a wildcard import needed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it xD

@adityastic adityastic force-pushed the patch-420 branch 2 times, most recently from 9899b3c to 4fda5be Compare July 8, 2019 04:58
@adityastic
Copy link
Collaborator Author

@yashk2000 run it locally on your device

@adityastic adityastic requested a review from yashk2000 July 8, 2019 04:58
@yashk2000
Copy link
Member

@adityastic on it.

@yashk2000
Copy link
Member

@adityastic tested it. When I am pressing the edit button, the app is crashing on my device.

@adityastic
Copy link
Collaborator Author

@adityastic tested it. When I am pressing the edit button, the app is crashing on my device.

logs?

@yashk2000
Copy link
Member

2019-07-08 20:59:13.460 23107-23107/org.fossasia.badgemagic E/AndroidRuntime: FATAL EXCEPTION: main Process: org.fossasia.badgemagic, PID: 23107 com.squareup.moshi.JsonDataException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $ at com.squareup.moshi.JsonUtf8Reader.beginObject(JsonUtf8Reader.java:162) at org.fossasia.badgemagic.data.fragments.BadgeConfigJsonAdapter.fromJson(BadgeConfigJsonAdapter.kt:42) at org.fossasia.badgemagic.data.fragments.BadgeConfigJsonAdapter.fromJson(BadgeConfigJsonAdapter.kt:17) at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:41) at org.fossasia.badgemagic.util.SendingUtils.getBadgeFromJSON$app_debug(SendingUtils.kt:98) at org.fossasia.badgemagic.bindings.EditBadgeViewBindingsKt.setBadgeValues(EditBadgeViewBindings.kt:19) at org.fossasia.badgemagic.databinding.ActivityEditBadgeBindingImpl.executeBindings(ActivityEditBadgeBindingImpl.java:255) at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:472) at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:444) at androidx.databinding.ViewDataBinding$7.run(ViewDataBinding.java:196) at androidx.databinding.ViewDataBinding$6.onViewAttachedToWindow(ViewDataBinding.java:164) at android.view.View.dispatchAttachedToWindow(View.java:18401) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3403) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3410) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3410) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3410) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3410) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3410) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1771) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1469) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7209) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1050) at android.view.Choreographer.doCallbacks(Choreographer.java:862) at android.view.Choreographer.doFrame(Choreographer.java:797) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1036) at android.os.Handler.handleCallback(Handler.java:874) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:198) at android.app.ActivityThread.main(ActivityThread.java:6729) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@adityastic adityastic force-pushed the patch-420 branch 2 times, most recently from 54fcac0 to 924850e Compare July 10, 2019 02:32
@adityastic adityastic changed the title wip: ability to edit badges feat: ability to edit badges Jul 10, 2019
@adityastic adityastic marked this pull request as ready for review July 10, 2019 02:36
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
import kotlinx.android.synthetic.main.activity_edit_clipart.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wildcard import xD

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its kotlin synthetic xD. It is allowed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohk 👍

Copy link
Member

@yashk2000 yashk2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine on my device 👍

@iamareebjamal iamareebjamal merged commit 80fc945 into fossasia:development Jul 10, 2019
@adityastic adityastic deleted the patch-420 branch July 21, 2019 06:19
@adityastic adityastic self-assigned this Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ability to edit badges
3 participants