My laptop shuts down immediately when i unplug the charger
Okay so I got my macbook air laptop about six months ago, so it's relatively new. About a month ago the harddrive inside failed and i took it to the aple store and they replaced the harddrive free of charge since i was still under the year warranty. I lost all my data since i didn't back it up but it worked normally after that. Now, about a month later, I'm having this charging problem. My computer charges very very slowly when its plugged in (i think it charged about 7 percent over like 15 hours), and the second i unplug the charger, the computer shuts down. I tried looking around the internet for solutions and some people with the same problem say they have like a red or black x where the battery is, but nothing looks out of the ordinary on mine except for the fact that it charges so slowly. In all the time that I've had and used it it's only gone fully dead and shut off by itself a few times (what i mean is that, i almost never let it go completely uncharged, when it was low on battery i charged it instead of letting it die). Also, when i unplug the charger, right before my laptop shuts down, i can see that the battery percentage without the cord plugged in is 0 percent even though that makes no sense because when the charger is in it says 85 percent. The only thing i can think of that I've been doing differently on my computer recently is that two days ago i couldn't find the wall piece for my iphone charger so i charged it via the usb port in my computer a few times. I didn't think this would affect my computer though? This could be totally unrelated, but it's the only thing i can think of that's different than usual. Also, the computer works totally fine when the charger is plugged in. I've had this problem for a few days now and i think it's getting worse. When it first started, the computer would only shut down a few minutes after i unplugged the charger, but now it shuts down within seconds of the charger coming out. I'm very hesitant to open the computer up because I'm not the best with computers and I'm afraid I might mess something up inside. If it really is a problem with the battery and it has to be replaced, I guess that's okay because I'm still under warranty, but I'd prefer if i could fix this on my own. Thankyou so much for your help and all answers are appreciated 🙂
MacBook Air, OS X Mountain Lion (10.8.2)