Skip to content

Commit

Permalink
Merge pull request #39 from makdenis/fixtaskkeyboard
Browse files Browse the repository at this point in the history
Fix taskkeyboard
  • Loading branch information
makdenis authored Dec 6, 2017
2 parents afee6f9 + 67911ff commit 9f6c2e1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions services/state_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ def all_tasks_state(bot, update, context):

else:
keyboard = []
id = 1
for task in tasks_to_show:
keyboard.append([InlineKeyboardButton(str(task), callback_data=str(id))])
id = id + 1

for task_as_string, task_object in zip(tasks_to_show,user_tasks):
keyboard.append([InlineKeyboardButton(str(task_as_string), callback_data=str(task_object.get_id()))])
reply_markup = InlineKeyboardMarkup(keyboard)
update.message.reply_text(message_source[lang]['your_tasks'].format(first_name),reply_markup=reply_markup)

Expand Down

0 comments on commit 9f6c2e1

Please sign in to comment.