Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

Burgx swipe#22

Open
Kirillvs wants to merge 4 commits intoBurgxfrom
Burgx_Swipe
Open

Burgx swipe#22
Kirillvs wants to merge 4 commits intoBurgxfrom
Burgx_Swipe

Conversation

@Kirillvs
Copy link
Contributor

@Kirillvs Kirillvs commented Aug 7, 2018

No description provided.

resValue "string", "app_name", "Burgx Demo Local"
// For android emulator local machine is 10.0.2.2
buildConfigField "String", "SERVER_URL", '"http://10.0.2.2:3000/"'
buildConfigField "String", "SERVER_URL", '"http://23.101.67.216:8080/"'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Зачем это меняешь?
10.0.2.2 это адрес, по которому доступна хост машина с эмулятора, то есть если ты развернешь у себя на компе сервак, сможешь его использовать
В Gradle уже все варианты указаны
Используются через вкладку Build Variants в Android Studio
Если хочешь, что бы приложение смотрело на:

  • staging выбирай demoStagingDebug
  • production выбирай demoProductionDebug
  • на твой комп выбирай demoLocalDebug

Когда будешь делать релизный билд, то выбирай demoProductionRelease

Copy link

Choose a reason for hiding this comment

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

Это Андрей менял, потому что у меня в эмуляторе приложение не могло загрузить данные из базы

Copy link
Member

Choose a reason for hiding this comment

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

Кирилл, я не знаю что там надо делать чтобы эмулятор смотрел на демо. У Славы была винда, и бекенд они бы там хрен развернули ) Я пошел по простому пути.

Но вообще да, оставлять такие изменения врядли хорошая идея...

@@ -0,0 +1,33 @@
package ru.arink_group.deliveryapp.domain.dao;

public class News {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Имхо для такого data access object удобнее использовать data class из kotlin, он за тебя сделает все сеттеры, геттеры

Copy link

Choose a reason for hiding this comment

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

Учту, спасибо =)

val deliveryTime: String,
val note: String?,
val pickup: Boolean,
val products: MutableList<OrderProduct>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

А зачем меняешь на MutableList?

Copy link

Choose a reason for hiding this comment

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

Это я не менял насколько я помню

Copy link
Member

Choose a reason for hiding this comment

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

Гиту виднее кто что менял =)

val dateTime = DateTime(date)

if (dateTime.minute == 59 && dateTime.hour == 22)
return true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Почему он должен быть активен в 22:59? 🤔

Copy link

Choose a reason for hiding this comment

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

Все, что связано с возвратом из таймпикера в случае выбора ближайшего времени и местами, где есть ==22 и ==59, это сделано так, потому что в версии приложения, с которой я работал, бэк не был готов к передаче null, так Андрей сказал мне, поэтому я сделал костыль ,надо смерджить версии и тогда можно будет сделать null вместо этого костыля, ну а вообще мне конечно надо было хоть комментарий оставить на этот счет, извините

Copy link
Member

Choose a reason for hiding this comment

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

Вообще проблемы бекенда - это проблемы бекенда. Не нужно делать костыли "пока бекенд не заработает". Было ведь обговорено что должно быть так. Сейчас уже принимает

Copy link

Choose a reason for hiding this comment

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

тогда я делаю возврат null, но тогда в моей версии приложения , до соединения с вашей, будут ошибки несоответствия типов, потому что сейчас мне пишет, что там должен быть Int, а я пытаюсь передать Null, соответственно работать оно не будет, пока не соедините с той версией, где уже можно Null передавать в DateTime

@SerializedName("description")
@Expose
private String description;
@SerializedName("imgUrl")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

А точно так? Мне кажется с бэка тебе придет img_url, а не imgUrl

Copy link

Choose a reason for hiding this comment

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

это я поменяю


@Override
public String getNote() {
return (note.getText().toString().equals("Комментарий ...")) ? null : note.getText().toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

там же плейсхолдер какой то Комментарий ... ?
Лучше вынести и использовать из R.string или какого то общего места, что бы один источник был

Copy link

Choose a reason for hiding this comment

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

Комментарий... это hint к edittext. Я делал это ссылкой на строку, но у меня не получилось почему-то добиться правильной работы, потому что я вытягивал из R.string.note постоянно id строки , а не саму строку

}

@Override
public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

я так понимаю теперь вместо onTimeSet используется onTimeChanged, тогда надо выпилить метод и TimePickerDialog.OnTimeSetListener из implements
или оно где то еще используется?

Copy link

Choose a reason for hiding this comment

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

уберу

* A simple [Fragment] subclass.
*/
class RetryOrderFragment : Fragment(), RetryOrderView, TimePickerDialog.OnTimeSetListener {
class RetryOrderFragment : Fragment(), RetryOrderView, TimePickerDialog.OnTimeSetListener, TimePicker.OnTimeChangedListener {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

тут аналогично, если интерфейс TimePickerDialog.OnTimeSetListener не используется то нужно выпилить и его и сам метод реализованный

Copy link

@Swipesh Swipesh Aug 8, 2018

Choose a reason for hiding this comment

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

да, уберу

val dateTime = DateTime(date)

timePicker.text = dateTime.toTimeWithDate()
if (dateTime.minute == 59 && dateTime.hour == 22)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔

local.properties Outdated
# For customization when using a Version Control System, please read the
# header note.
#Wed Jul 04 15:41:42 VLAT 2018
sdk.dir=C\:\\Users\\Swipe\\AppData\\Local\\Android\\Sdk
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Так как у каждого свои настройки среды разработки такие файлы нельзя добавлять, добавь в .gitignore и выпили из репозитория

Copy link

Choose a reason for hiding this comment

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

я не понял, что надо сделать, что значит добавить в gitignore и выпилить из репозитория

Copy link
Member

Choose a reason for hiding this comment

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

В проекте есть файл .gitignore лежит в корне. В нем правила прописаны какие файлы не должны быть в гите.
Соответственно нужно добавить правило в этот файл. И затем выпилить его из гита

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants