This is the 10966th most frequent Turkish word.
dinlendiğini
"Dinlendiğini" means "that (he/she/it) is resting" or "that (he/she/it) has rested."
Here, 'dinlendiğini' is used as a part of a clause to express knowledge about someone resting. It functions as a noun clause governed by the verb 'duyunca' (when I heard).
Ali'nin dinlendiğini duyunca sevindim.
I was happy when I heard that Ali was resting.
In this sentence, 'dinlendiğini' forms a clause representing a misunderstanding or assumption about someone's state of rest, governed by 'sanıyordum' (I thought).
Dinlendiğini sanıyordum, ama çalışıyormuş.
I thought you were resting, but it turns out you were working.
Here, 'dinlendiğini' functions within the clause as the object of 'görmek' (seeing), indicating the state perceived.